From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jun 25 01:20:05 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D17106566C for ; Sat, 25 Jun 2011 01:20:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EF0888FC0A for ; Sat, 25 Jun 2011 01:20:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5P1K4Va071320 for ; Sat, 25 Jun 2011 01:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5P1K4Io071319; Sat, 25 Jun 2011 01:20:04 GMT (envelope-from gnats) Resent-Date: Sat, 25 Jun 2011 01:20:04 GMT Resent-Message-Id: <201106250120.p5P1K4Io071319@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pedro Giffuni Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C2F6106566B for ; Sat, 25 Jun 2011 01:12:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 7C2778FC12 for ; Sat, 25 Jun 2011 01:12:53 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5P1CrSP071791 for ; Sat, 25 Jun 2011 01:12:53 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p5P1Cqq5071785; Sat, 25 Jun 2011 01:12:52 GMT (envelope-from nobody) Message-Id: <201106250112.p5P1Cqq5071785@red.freebsd.org> Date: Sat, 25 Jun 2011 01:12:52 GMT From: Pedro Giffuni To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/158270: cad/spice: cleanup some warning that CLANG considers fatal. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jun 2011 01:20:05 -0000 >Number: 158270 >Category: ports >Synopsis: cad/spice: cleanup some warning that CLANG considers fatal. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jun 25 01:20:04 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release: 9.0-Current >Organization: >Environment: FreeBSD mogwai.giffuni.net 9.0-CURRENT FreeBSD 9.0-CURRENT #6: Sat Apr 30 01:37:57 PDT 2011 root@build9x64.pcbsd.org:/usr/obj/pcbsd-build90/fbsd-source/9.0/sys/PCBSD amd64 >Description: CLANG is very picky about "void main", which is barely a warning on gcc. I think I got all of those and, while here, I cleaned up some header includes. >How-To-Repeat: >Fix: Patch attached Patch attached with submission follows: diff -ruN spice.orig/files/patch-src-lib-mfb-mfbcaps.c spice/files/patch-src-lib-mfb-mfbcaps.c --- spice.orig/files/patch-src-lib-mfb-mfbcaps.c 2011-06-24 14:25:22.000000000 +0000 +++ spice/files/patch-src-lib-mfb-mfbcaps.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ ---- src/lib/mfb/mfbcaps.c.orig Sat Oct 7 15:56:38 2006 -+++ src/lib/mfb/mfbcaps.c Sat Oct 7 15:57:51 2006 -@@ -43,9 +43,9 @@ - - FILE *POpen(); - char *strcpy(); --char *MFBSkip(); -+static char *MFBSkip(); - char *MFBGetStr(); --char *MFBCapDecod(); -+static char *MFBCapDecod(); - int MFBGetNum(); - int MFBGetFlag(); - int MFBGetEnt(); diff -ruN spice.orig/files/patch-src_bin_help.c spice/files/patch-src_bin_help.c --- spice.orig/files/patch-src_bin_help.c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_bin_help.c 2011-06-24 19:14:44.000000000 +0000 @@ -0,0 +1,11 @@ +--- src/bin/help.c.orig 2011-06-24 19:12:52.000000000 +0000 ++++ src/bin/help.c 2011-06-24 19:13:19.000000000 +0000 +@@ -46,7 +46,7 @@ + char *hlp_filelist[] = { "spice", 0 }; + + /* ARGSUSED */ +-void ++int + main(ac, av) + int ac; + char **av; diff -ruN spice.orig/files/patch-src_bin_main.c spice/files/patch-src_bin_main.c --- spice.orig/files/patch-src_bin_main.c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_bin_main.c 2011-06-24 16:55:29.000000000 +0000 @@ -0,0 +1,11 @@ +--- src/bin/main.c.orig 2011-06-24 16:53:54.000000000 +0000 ++++ src/bin/main.c 2011-06-24 16:54:24.000000000 +0000 +@@ -183,7 +183,7 @@ + + char *hlp_filelist[] = { "spice", 0 }; + +-void ++int + main(ac, av) + char **av; + { diff -ruN spice.orig/files/patch-src_bin_procmod.c spice/files/patch-src_bin_procmod.c --- spice.orig/files/patch-src_bin_procmod.c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_bin_procmod.c 2011-06-24 16:10:20.000000000 +0000 @@ -0,0 +1,11 @@ +--- src/bin/proc2mod.c.orig 2011-06-24 16:07:41.000000000 +0000 ++++ src/bin/proc2mod.c 2011-06-24 16:08:43.000000000 +0000 +@@ -51,7 +51,7 @@ + char *dataline; + + +-void ++int + main() { + char *typeline; + char *prname; diff -ruN spice.orig/files/patch-src_bin_sconvert_c spice/files/patch-src_bin_sconvert_c --- spice.orig/files/patch-src_bin_sconvert_c 2011-06-24 14:25:22.000000000 +0000 +++ spice/files/patch-src_bin_sconvert_c 2011-06-24 19:07:29.000000000 +0000 @@ -1,5 +1,14 @@ ---- src/bin/sconvert.c.orig Mon Sep 14 21:30:41 1992 -+++ src/bin/sconvert.c Thu Jul 17 00:47:50 2003 +--- src/bin/sconvert.c.orig 1992-09-15 01:30:41.000000000 +0000 ++++ src/bin/sconvert.c 2011-06-24 19:05:59.000000000 +0000 +@@ -36,7 +36,7 @@ + static struct plot *oldread(); + static char *fixdate(); + +-void ++int + main(ac, av) + char **av; + { @@ -80,19 +80,19 @@ case 1: printf("Input file: "); diff -ruN spice.orig/files/patch-src_include_fteext.h spice/files/patch-src_include_fteext.h --- spice.orig/files/patch-src_include_fteext.h 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_include_fteext.h 2011-06-24 16:22:24.000000000 +0000 @@ -0,0 +1,11 @@ +--- src/include/fteext.h.orig 2011-06-24 16:19:49.000000000 +0000 ++++ src/include/fteext.h 2011-06-24 16:21:21.000000000 +0000 +@@ -419,7 +419,7 @@ + extern SIGNAL_TYPE sigbus(); + extern SIGNAL_TYPE sigsegv(); + extern SIGNAL_TYPE sig_sys(); +-extern void main(); ++extern int main(); + + /* spiceif.c & nutmegif.c */ + diff -ruN spice.orig/files/patch-src_include_misc_h spice/files/patch-src_include_misc_h --- spice.orig/files/patch-src_include_misc_h 2011-06-24 14:25:22.000000000 +0000 +++ spice/files/patch-src_include_misc_h 2011-06-24 16:39:39.000000000 +0000 @@ -1,16 +1,26 @@ ---- src/include/misc.h.orig Sun Apr 25 16:37:48 1993 -+++ src/include/misc.h Mon Apr 3 23:04:51 2006 -@@ -86,8 +86,10 @@ +--- src/include/misc.h.orig 1993-04-25 21:37:48.000000000 +0000 ++++ src/include/misc.h 2011-06-24 16:37:44.000000000 +0000 +@@ -86,9 +86,11 @@ extern char *realloc(); extern char *getenv(); extern int errno; +#ifndef __FreeBSD__ extern char *sys_errlist[]; extern char *getenv(); -+#endif extern char *getwd(); ++#endif extern int rand(); extern int srand(); + extern int atoi(); +@@ -100,7 +102,7 @@ + # endif + + # ifdef HAS_GETCWD +-extern char *getcwd( ); ++#include + # endif + + # ifdef HAS_CLEARERR @@ -154,7 +156,9 @@ #ifndef HAS_MEMAVL diff -ruN spice.orig/files/patch-src_lib_cp_cshpar_c spice/files/patch-src_lib_cp_cshpar_c --- spice.orig/files/patch-src_lib_cp_cshpar_c 2011-06-24 14:25:22.000000000 +0000 +++ spice/files/patch-src_lib_cp_cshpar_c 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ ---- src/lib/cp/cshpar.c.orig Mon Nov 12 02:26:08 2007 -+++ src/lib/cp/cshpar.c Mon Nov 12 02:30:46 2007 -@@ -6,6 +6,7 @@ - /* - * The main entry point for cshpar. - */ -+#include - - #include "spice.h" - #include "misc.h" diff -ruN spice.orig/files/patch-src_lib_cp_unixcom.c spice/files/patch-src_lib_cp_unixcom.c --- spice.orig/files/patch-src_lib_cp_unixcom.c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_cp_unixcom.c 2011-06-24 16:32:22.000000000 +0000 @@ -0,0 +1,10 @@ +--- src/lib/cp/unixcom.c.orig 2011-06-24 16:24:35.000000000 +0000 ++++ src/lib/cp/unixcom.c 2011-06-24 16:30:47.000000000 +0000 +@@ -6,6 +6,7 @@ + /* + * Routines to do execution of unix commands. + */ ++#include + + #include "spice.h" + #include "cpdefs.h" diff -ruN spice.orig/files/patch-src_lib_mfb_mfbcaps.c spice/files/patch-src_lib_mfb_mfbcaps.c --- spice.orig/files/patch-src_lib_mfb_mfbcaps.c 1970-01-01 00:00:00.000000000 +0000 +++ spice/files/patch-src_lib_mfb_mfbcaps.c 2011-06-24 19:58:46.000000000 +0000 @@ -0,0 +1,22 @@ +--- src/lib/mfb/mfbcaps.c.orig 1991-04-01 22:32:50.000000000 +0000 ++++ src/lib/mfb/mfbcaps.c 2011-06-24 19:53:27.000000000 +0000 +@@ -26,6 +26,7 @@ + #include "spice.h" + #include "mfb.h" + #include ++#include + #include "suffix.h" + + +@@ -43,9 +44,9 @@ + + FILE *POpen(); + char *strcpy(); +-char *MFBSkip(); ++static char *MFBSkip(); + char *MFBGetStr(); +-char *MFBCapDecod(); ++static char *MFBCapDecod(); + int MFBGetNum(); + int MFBGetFlag(); + int MFBGetEnt(); >Release-Note: >Audit-Trail: >Unformatted: