Date: Tue, 28 May 2013 14:21:23 GMT From: G Todd <gtodd@bellanet.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/179050: sysutils/fsc compile fails w/ clang Message-ID: <201305281421.r4SELNvD039395@oldred.FreeBSD.org> Resent-Message-ID: <201305281430.r4SEU03O053485@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179050 >Category: ports >Synopsis: sysutils/fsc compile fails w/ clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 28 14:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: G Todd >Release: 9.1 >Organization: >Environment: ~/% clang --version clang version 3.4 (trunk) Target: amd64-portbld-freebsd9.1 Thread model: posix ~/% uname -a FreeBSD ninga.iciti.internal 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: fscd.c:977:13: error: variable 'sendstr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] } else if (strcmp(arglst[0], "status") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fscd.c:984:16: note: uninitialized use occurs here send(sock_fd, sendstr, strlen(sendstr), 0); ^~~~~~~ fscd.c:977:9: note: remove the 'if' if its condition is always true } else if (strcmp(arglst[0], "status") == 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fscd.c:934:15: note: initialize the variable 'sendstr' to silence this warning char *sendstr; ^ >How-To-Repeat: Try to build fsc with recent clang (clang-devel-3.4.r181598_3) >Fix: clang recommends initializing the variable 'sendstr'. I have not tried this. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305281421.r4SELNvD039395>