Menu

#777 compilation warning: "auction.c:80:31: warning: initializer element is not a constant expression"

v1.0 (example)
closed-fixed
nobody
None
5
2019-07-14
2019-07-09
Rolf
No

With the current HEAD I get a warning during compilation

$ make
 cd . && /bin/sh /usr/src/esniper/missing automake-1.14 --gnu
 cd . && /bin/sh ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
gcc -DPACKAGE_NAME=\"esniper\" -DPACKAGE_TARNAME=\"esniper\" -DPACKAGE_VERSION=\"2.35.1\" -DPACKAGE_STRING=\"esniper\ 2.35.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"esniper\" -DVERSION=\"2.35.1\" -I.     -g -O2 -MT auction.o -MD -MP -MF .deps/auction.Tpo -c -o auction.o auction.c
auction.c:80:31: warning: initializer element is not a constant expression
 static size_t placemakerLen = strlen("%s");
                               ^
mv -f .deps/auction.Tpo .deps/auction.Po

The compilation itself seems to succeed and produce a working binary.

Discussion

  • Michael S.

    Michael S. - 2019-07-10

    My stupitity using copy&paste: "static" ist wrong. Just "size_t placemakerLen = ..." would be correct.

     
  • Michael S.

    Michael S. - 2019-07-14
    • status: open --> closed-fixed
     
  • Michael S.

    Michael S. - 2019-07-14

    See commit [b72ac9]

     

    Related

    Commit: [b72ac9]


Log in to post a comment.