Bug 179050 - sysutils/fsc compile fails w/ clang
Summary: sysutils/fsc compile fails w/ clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Tom Rhodes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 15:30 UTC by Graham Todd
Modified: 2013-06-03 17:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Todd 2013-05-28 15:30:00 UTC
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;
                     ^

Fix: 

clang recommends initializing the variable 'sendstr'.  I have not tried this.
How-To-Repeat: Try to build fsc with recent clang (clang-devel-3.4.r181598_3)
Comment 1 Edwin Groothuis freebsd_committer 2013-05-28 15:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->trhodes

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2013-06-03 17:32:32 UTC
Author: trhodes (src,doc committer)
Date: Mon Jun  3 16:32:24 2013
New Revision: 319792
URL: http://svnweb.freebsd.org/changeset/ports/319792

Log:
  Update to fix breakage with clang.
  
  PR:		179050
  Requested by:	many

Modified:
  head/sysutils/fsc/Makefile
  head/sysutils/fsc/distinfo

Modified: head/sysutils/fsc/Makefile
==============================================================================
--- head/sysutils/fsc/Makefile	Mon Jun  3 16:02:16 2013	(r319791)
+++ head/sysutils/fsc/Makefile	Mon Jun  3 16:32:24 2013	(r319792)
@@ -8,7 +8,7 @@
 
 PORTNAME=	fsc
 PORTVERSION=	1.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	LOCAL
 MASTER_SITE_SUBDIR=	trhodes

Modified: head/sysutils/fsc/distinfo
==============================================================================
--- head/sysutils/fsc/distinfo	Mon Jun  3 16:02:16 2013	(r319791)
+++ head/sysutils/fsc/distinfo	Mon Jun  3 16:32:24 2013	(r319792)
@@ -1,2 +1,2 @@
-SHA256 (fsc-1.0.1.tar.gz) = 3cae8021534dfc7074173ceca0ffd1483c2f58badb28663d6a99bcbf754e1f0a
-SIZE (fsc-1.0.1.tar.gz) = 11708
+SHA256 (fsc-1.0.1.tar.gz) = 41979af3f5ed2fd37e30839cacc22408ac65f2fd20df30de1e5114bc0d2e733b
+SIZE (fsc-1.0.1.tar.gz) = 12435
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Tom Rhodes freebsd_committer 2013-06-03 17:33:08 UTC
State Changed
From-To: open->closed

New distfile rolled and the port was updated - it will not work 
until the sync of local distfiles is complete but all local tests 
show it'll work now.  Thanks, sorry it took so long!