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 2018/04/03 03:14:40 UTC

[GitHub] jacobrosenthal commented on issue #984: hw/util/button: allow to specify eventq

jacobrosenthal commented on issue #984: hw/util/button: allow to specify eventq
URL: https://github.com/apache/mynewt-core/pull/984#issuecomment-378115132
 
 
   This (actually not this, but the original PR) doesnt appear to build with the arm-gcc on macosx
   ```
   Error: repos/apache-mynewt-core/hw/util/button/src/button.c:49:15: error: missing braces around initializer [-Werror=missing-braces]
    static struct button_event button_event[MYNEWT_VAL(BUTTON_EVENT_MAX)] = { 0 };
                  ^
   repos/apache-mynewt-core/hw/util/button/src/button.c:49:15: error: (near initialization for 'button_event[0]') [-Werror=missing-braces]
   repos/apache-mynewt-core/hw/util/button/src/button.c: In function 'button_alloc_event':
   repos/apache-mynewt-core/hw/util/button/src/button.c:55:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
        for (int i = 0 ; i < MYNEWT_VAL(BUTTON_EVENT_MAX) ; i++) 
        ^
   repos/apache-mynewt-core/hw/util/button/src/button.c:55:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
   repos/apache-mynewt-core/hw/util/button/src/button.c: In function 'button_init':
   repos/apache-mynewt-core/hw/util/button/src/button.c:509:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
        for (unsigned int i = 0 ; i < count ; i++) {
        ^
   repos/apache-mynewt-core/hw/util/button/src/button.c:517:23: error: redefinition of 'i'
        for (unsigned int i = 0 ; i < count ; i++) {
                          ^
   repos/apache-mynewt-core/hw/util/button/src/button.c:509:23: note: previous definition of 'i' was here
        for (unsigned int i = 0 ; i < count ; i++) {
                          ^
   repos/apache-mynewt-core/hw/util/button/src/button.c:517:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
        for (unsigned int i = 0 ; i < count ; i++) {
        ^
   cc1: all warnings being treated as errors
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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