zookeeper-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrico Olivelli (Jira)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3569) Compile error due to LOGSTREAM being null when passed to fprintf
Date Tue, 08 Oct 2019 05:04:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16946487#comment-16946487
] 

Enrico Olivelli commented on ZOOKEEPER-3569:
--------------------------------------------

Please add env info for future reference like
uname -a 
gcc version

Do you want to submit a patch?

Thanks for your report


> Compile error due to LOGSTREAM being null when passed to fprintf
> ----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3569
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3569
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>            Reporter: Ronald Fenner
>            Priority: Major
>
> I'm trying to compile the source and getting this error
> make all-am
>  make[1]: Entering directory `/home/ec2-user/zookeeper/zookeeper-client/zookeeper-client-c'
>  /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests
-I./generated -Wall -Werror -Wdeclaration-after-statement -g -O2 -D_GNU_SOURCE -MT zookeeper.lo
-MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
>  libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall
-Werror -Wdeclaration-after-statement -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo
-c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
>  src/zookeeper.c: In function 'print_completion_queue':
>  src/zookeeper.c:2542:5: error: null argument where non-null required (argument 1) [-Werror=nonnull]
>  fprintf(LOGSTREAM,"Completion queue: ");
>  ^~~~~~~
>  src/zookeeper.c:2544:9: error: null argument where non-null required (argument 1) [-Werror=nonnull]
>  fprintf(LOGSTREAM,"empty\n");
>  ^~~~~~~
>  src/zookeeper.c:2550:9: error: null argument where non-null required (argument 1) [-Werror=nonnull]
>  fprintf(LOGSTREAM,"%d,",cptr->xid);
>  ^~~~~~~
>  src/zookeeper.c:2553:5: error: null argument where non-null required (argument 1) [-Werror=nonnull]
>  fprintf(LOGSTREAM,"end\n");
>  ^~~~~~~
>  cc1: all warnings being treated as errors
>  make[1]: *** [zookeeper.lo] Error 1
>  make[1]: Leaving directory `/home/ec2-user/zookeeper/zookeeper-client/zookeeper-client-c'
>  make: *** [all] Error 2
>  
> Looking through the code in include/zookeeper_log.h at line 30 LOGSTREAM is defined as
NULL. This cause the above error.
> In the 3.4.x branch it was getLogStream().
> I believe this for the 3.5 branch should be zoo_get_log_stream()
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message