FelipeMdeO commented on code in PR #3532:
URL: https://github.com/apache/nuttx-apps/pull/3532#discussion_r3448709822
##########
netutils/dropbear/patch/0007-use-nuttx-unused-macro.patch:
##########
@@ -0,0 +1,267 @@
+--- a/src/chachapoly.c
++++ b/src/chachapoly.c
+@@ -43,11 +43,15 @@
+ const struct dropbear_cipher dropbear_chachapoly =
+ {&dummy, CHACHA20_KEY_LEN*2, CHACHA20_BLOCKSIZE};
+
+-static int dropbear_chachapoly_start(int UNUSED(cipher), const unsigned char*
UNUSED(IV),
++static int dropbear_chachapoly_start(int cipher, const unsigned char *IV,
+ const unsigned char *key, int keylen,
+- int UNUSED(num_rounds), dropbear_chachapoly_state
*state) {
++ int num_rounds, dropbear_chachapoly_state *state) {
+ int err;
+
++ UNUSED(cipher);
++ UNUSED(IV);
++ UNUSED(num_rounds);
++
+ TRACE2(("enter dropbear_chachapoly_start"))
+
+ if (keylen != CHACHA20_KEY_LEN*2) {
+--- a/src/common-algo.c
++++ b/src/common-algo.c
+@@ -40,16 +40,25 @@
+ * decide which ciphers/hashes/compression/signing to use during key
exchange*/
+
+ static int void_cipher(const unsigned char* in, unsigned char* out,
+- unsigned long len, void* UNUSED(cipher_state)) {
++ unsigned long len, void *cipher_state) {
++ UNUSED(cipher_state);
++
+ if (in != out) {
+ memmove(out, in, len);
+ }
+ return CRYPT_OK;
+ }
+
+-static int void_start(int UNUSED(cipher), const unsigned char* UNUSED(IV),
+- const unsigned char* UNUSED(key),
+- int UNUSED(keylen), int UNUSED(num_rounds), void*
UNUSED(cipher_state)) {
++static int void_start(int cipher, const unsigned char *IV,
++ const unsigned char *key,
++ int keylen, int num_rounds, void *cipher_state) {
++ UNUSED(cipher);
++ UNUSED(IV);
++ UNUSED(key);
++ UNUSED(keylen);
++ UNUSED(num_rounds);
++ UNUSED(cipher_state);
++
Review Comment:
Sorry, I did a mistake.
We need these functions. For example void_start is used in the function
dropbear_mode_none. So I need keep it in the patch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]