summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-01-09 22:41:08 -0700
committerDavid S. Miller <davem@davemloft.net>2019-01-19 10:01:03 -0800
commit7afa81c55fca0cad589722cb4bce698b4803b0e1 (patch)
treef01c42c32265bdf5049b1f1524abaddea1cc16a8 /include/linux
parent8a7fa0c35027d1a3ec3c3e8612800a1b4738e3c3 (diff)
isdn: avm: Fix string plus integer warning from Clang
A recent commit in Clang expanded the -Wstring-plus-int warning, showing some odd behavior in this file. drivers/isdn/hardware/avm/b1.c:426:30: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] cinfo->version[j] = "\0\0" + 1; ~~~~~~~^~~ drivers/isdn/hardware/avm/b1.c:426:30: note: use array indexing to silence this warning cinfo->version[j] = "\0\0" + 1; ^ & [ ] 1 warning generated. This is equivalent to just "\0". Nick pointed out that it is smarter to use "" instead of "\0" because "" is used elsewhere in the kernel and can be deduplicated at the linking stage. Link: https://github.com/ClangBuiltLinux/linux/issues/309 Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions