Skip to content
  • Nobuyoshi Nakada's avatar
    2789bddd
    Use array indexing with considering clang's feeling · 2789bddd
    Nobuyoshi Nakada authored
    ```
    In file included from sprintf.c:1256:
    ./vsnprintf.c:833:8: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                                IS_PRI_EXTRA_MARK(fmt)) {
                                ^~~~~~~~~~~~~~~~~~~~~~
    ./vsnprintf.c:826:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
               strncmp((s)+1, PRI_EXTRA_MARK+1, \
                              ~~~~~~~~~~~~~~^~
    ./vsnprintf.c:833:8: note: use array indexing to silence this warning
    ./vsnprintf.c:826:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
               strncmp((s)+1, PRI_EXTRA_MARK+1, \
                                            ^
    1 warning generated.
    ```
    2789bddd
    Use array indexing with considering clang's feeling
    Nobuyoshi Nakada authored
    ```
    In file included from sprintf.c:1256:
    ./vsnprintf.c:833:8: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                                IS_PRI_EXTRA_MARK(fmt)) {
                                ^~~~~~~~~~~~~~~~~~~~~~
    ./vsnprintf.c:826:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
               strncmp((s)+1, PRI_EXTRA_MARK+1, \
                              ~~~~~~~~~~~~~~^~
    ./vsnprintf.c:833:8: note: use array indexing to silence this warning
    ./vsnprintf.c:826:34: note: expanded from macro 'IS_PRI_EXTRA_MARK'
               strncmp((s)+1, PRI_EXTRA_MARK+1, \
                                            ^
    1 warning generated.
    ```
Loading