-Wstring-plus-int warning when building Lua with clang

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

-Wstring-plus-int warning when building Lua with clang

Michał Górny
Hi,

I've just built Lua (tried both 5.3.5 and 5.4.0-work2) using clang,
and I've noticed clang-8 reports a warning in one of the files.  This is
of course not a problem but figured you might want to know.


$ make linux CC=clang CXX=clang++
[...]
clang -O2 -Wall -Wextra -DLUA_COMPAT_5_3 -DLUA_USE_LINUX    -c -o lundump.o lundump.c
lundump.c:265:33: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
  checkliteral(S, LUA_SIGNATURE + 1, "not a");  /* 1st char already checked */
                  ~~~~~~~~~~~~~~^~~
lundump.c:265:33: note: use array indexing to silence this warning
  checkliteral(S, LUA_SIGNATURE + 1, "not a");  /* 1st char already checked */
                                ^
                  &             [  ]
1 warning generated.


Also, your mailman instance crashes when I type my name (because of non-
ASCII characters).

--
Best regards,
Michał Górny


signature.asc (981 bytes) Download Attachment