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


##########
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:
   Done.



##########
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);
++
+       return CRYPT_OK;
+ }
+
+--- a/src/common-channel.c
++++ b/src/common-channel.c
+@@ -410,7 +410,9 @@
+
+ #ifndef HAVE_WRITEV
+ static int writechannel_fallback(struct Channel* channel, int fd, circbuffer 
*cbuf,
+-      const unsigned char *UNUSED(moredata), unsigned int *morelen) {
++      const unsigned char *moredata, unsigned int *morelen) {
++      UNUSED(moredata);
++
+
+       unsigned char *circ_p1, *circ_p2;
+       unsigned int circ_len1, circ_len2;
+--- a/src/common-kex.c
++++ b/src/common-kex.c
+@@ -420,11 +420,15 @@
+                       && ses.keys->recv.algo_comp == 
DROPBEAR_COMP_ZLIB_DELAY);
+ }
+
+-static void* dropbear_zalloc(void* UNUSED(opaque), uInt items, uInt size) {
++static void *dropbear_zalloc(void *opaque, uInt items, uInt size) {
++      UNUSED(opaque);
++
+       return m_calloc(items, size);
+ }
+
+-static void dropbear_zfree(void* UNUSED(opaque), void* ptr) {
++static void dropbear_zfree(void *opaque, void *ptr) {
++      UNUSED(opaque);
++

Review Comment:
   Done.



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