You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/12 20:00:35 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4128: nuttx net warning:add initialization of pointer *aiocbp in lio_listio

gustavonihei commented on a change in pull request #4128:
URL: https://github.com/apache/incubator-nuttx/pull/4128#discussion_r667891030



##########
File path: libs/libc/aio/lio_listio.c
##########
@@ -507,7 +507,7 @@ static int lio_waitall(FAR struct aiocb * const *list, int nent)
 int lio_listio(int mode, FAR struct aiocb * const list[], int nent,
                FAR struct sigevent *sig)
 {
-  FAR struct aiocb *aiocbp;
+  FAR struct aiocb *aiocbp = NULL;

Review comment:
       According to the NuttX coding standard, `aiocbp` should be initialized separately from its definition.
   So it is better to move the NULL attribution to line 523

##########
File path: libs/libc/aio/lio_listio.c
##########
@@ -507,7 +507,7 @@ static int lio_waitall(FAR struct aiocb * const *list, int nent)
 int lio_listio(int mode, FAR struct aiocb * const list[], int nent,
                FAR struct sigevent *sig)
 {
-  FAR struct aiocb *aiocbp;
+  FAR struct aiocb *aiocbp = NULL;

Review comment:
       Sorry, that was a misinterpretation of the C89 standard from myself. LGTM

##########
File path: libs/libc/debug/lib_backtrace.c
##########
@@ -44,7 +44,7 @@ struct trace_arg
  * Private Functions
  ****************************************************************************/
 
-static inline weak_function
+weak_function

Review comment:
       Could you at least move this change to a separate commit? This is not related to the above change.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org