lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Kind of related, clang on macOS gives a few warning about the comma operator, and suggest cast it to void in order to avoid the warning.

                                ^
lua/src/ltablib.c:323:12: note: cast _expression_ to void to silence warning
      while (lua_geti(L, 1, --j), sort_comp(L, -3, -1)) {
             ^~~~~~~~~~~~~~~~~~~
             (void)(            )
            
lua/src/liolib.c:42:28: note: cast _expression_ to void to silence warning
           (*mode != '+' || (++mode, 1)) &&  /* skip if char is '+' */
                             ^~~~~~
                             (void)( )


On Thu, May 9, 2019 at 12:52 PM Dirk Laurie <dirk.laurie@gmail.com> wrote:
You are right. This buiild was not in a pristine Lua directory, but in
one that has been patched.

Sorry for the noise.

Op Do. 9 Mei 2019 om 18:47 het Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> geskryf:
>
> > lua.c:259:12: note: expected ‘char *’ but argument is of type ‘const char *’
> >  static int dolibrary (lua_State *L, char *name) {
>
> The line number is right but the contents is not. In Lua 5.3.5, this line reads:
>
> static int dolibrary (lua_State *L, const char *name) {
>