зеркало из https://github.com/github/ruby.git
Use array indexing with considering clang's feeling
``` 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. ```
This commit is contained in:
Родитель
d53b669948
Коммит
2789bdddc7
|
@ -823,7 +823,7 @@ reswitch: switch (ch) {
|
|||
(PRI_EXTRA_MARK_LEN < 1 || \
|
||||
(*(s) == PRI_EXTRA_MARK[0] && \
|
||||
(PRI_EXTRA_MARK_LEN == 1 || \
|
||||
strncmp((s)+1, PRI_EXTRA_MARK+1, \
|
||||
strncmp((s)+1, &PRI_EXTRA_MARK[1], \
|
||||
PRI_EXTRA_MARK_LEN-1) == 0)))
|
||||
#else
|
||||
# define PRI_EXTRA_MARK_LEN 0
|
||||
|
|
Загрузка…
Ссылка в новой задаче