From dev-return-83130-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Mon Oct 7 23:47:27 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id A146C1804BB for ; Tue, 8 Oct 2019 01:47:26 +0200 (CEST) Received: (qmail 2310 invoked by uid 500); 7 Oct 2019 23:47:25 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 1754 invoked by uid 99); 7 Oct 2019 23:47:23 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Oct 2019 23:47:23 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 165FCE3170 for ; Mon, 7 Oct 2019 23:47:23 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 907F47824A4 for ; Mon, 7 Oct 2019 23:47:12 +0000 (UTC) Date: Mon, 7 Oct 2019 23:47:12 +0000 (UTC) From: "Ronald Fenner (Jira)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ZOOKEEPER-3569) Compile error due to LOGSTREAM being null when passed to fprintf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ronald Fenner created ZOOKEEPER-3569: ---------------------------------------- Summary: 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 I'm trying to compile the source and getting this error make all-am make[1]: Entering directory `/home/ec2-user/zookeeper/zookeeper-client/zook= eeper-client-c' /bin/sh ./libtool --tag=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H -I. -I./i= nclude -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./generat= ed -Wall -Werror -Wdeclaration-after-statement -g -O2 -D_GNU_SOURCE -MT zoo= keeper.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 (argum= ent 1) [-Werror=3Dnonnull] fprintf(LOGSTREAM,"Completion queue: "); ^~~~~~~ src/zookeeper.c:2544:9: error: null argument where non-null required (argum= ent 1) [-Werror=3Dnonnull] fprintf(LOGSTREAM,"empty\n"); ^~~~~~~ src/zookeeper.c:2550:9: error: null argument where non-null required (argum= ent 1) [-Werror=3Dnonnull] fprintf(LOGSTREAM,"%d,",cptr->xid); ^~~~~~~ src/zookeeper.c:2553:5: error: null argument where non-null required (argum= ent 1) [-Werror=3Dnonnull] 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/zooke= eper-client-c' make: *** [all] Error 2 =C2=A0 Looking through the code in include/zookeeper_log.h at line 30 LOGSTREAM is= defined as NULL. This cause the above error. In the 4.4.x branch it was=C2=A0getLogStream(). I believe this for the 3.5 branch should be=C2=A0zoo_get_log_stream() =C2=A0 =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)