You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/04/09 16:04:00 UTC

[GitHub] [mynewt-core] ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build with GCC 9.2.1

ccollins476ad commented on a change in pull request #2133: sys/stats: Fix build with GCC 9.2.1
URL: https://github.com/apache/mynewt-core/pull/2133#discussion_r406312014
 
 

 ##########
 File path: sys/stats/full/include/stats/stats.h
 ##########
 @@ -48,6 +48,7 @@ struct stats_hdr {
     int s_map_cnt;
 #endif
     STAILQ_ENTRY(stats_hdr) s_next;
+    uint8_t data[0];
 
 Review comment:
   The C standard prohibits zero-length arrays (gcc allows them as an extension).  The pedantically correct way to do this is to use a "flexible array member", i.e.,
   ```
   uint8_t data[]
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services