Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3302

ZooKeeper C client does not compile on Fedora 29

    XMLWordPrintableJSON

Details

    Description

      I cannot build current master (git sha 372e713a9d2d9264417313e5d68e9437ffddd0f5)  with Fedora 29

       

      gcc --version
      gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2)
      

       

      This is the error:

          [exec] gcc -DHAVE_CONFIG_H -I. -I/home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c  -I/home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/include -I/home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/tests -I/home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/generated   -Wall -Werror -Wdeclaration-after-statement -fprofile-arcs -ftest-coverage -g -O2 -D_GNU_SOURCE -MT cli.o -MD -MP -MF .deps/cli.Tpo -c -o cli.o `test -f 'src/cli.c' || echo '/home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/'`src/cli.c
           [exec] /home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/src/cli.c: In function ‘main’:
           [exec] /home/eolivelli/dev/zookeeper/zookeeper-client/zookeeper-client-c/src/cli.c:689:9: error: ‘strncpy’ specified bound 1024 equals destination size [-Werror=stringop-truncation]
           [exec]          strncpy(cmd, argv[2]+4, sizeof(cmd));
           [exec]          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           [exec] cc1: all warnings being treated as errors
           [exec] make: *** [Makefile:1155: cli.o] Error 1

      Attachments

        Issue Links

          Activity

            People

              eolivelli Enrico Olivelli
              eolivelli Enrico Olivelli
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h