acassis commented on code in PR #3532:
URL: https://github.com/apache/nuttx-apps/pull/3532#discussion_r3452508743


##########
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:
   I mean: since void_start() is not a function defined inside nuttx-apps 
source code like these files here;
   
   <img width="660" height="895" alt="image" 
src="https://github.com/user-attachments/assets/c2bda485-d206-425c-8806-97613ba8c48a";
 />
   
   So, you don't need to change the function definition, I think UNUSED() will 
work as well when used directly on parameters definition of the function. Right?



-- 
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]

Reply via email to