From nobody@FreeBSD.org  Sat Jun 25 01:12:53 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C2F6106566B
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <giffunip@tutopia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: cad/spice: cleanup some warning that CLANG considers fatal.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 25 01:20:04 UTC 2011
>Closed-Date:    Sat Jun 25 07:47:06 UTC 2011
>Last-Modified:  Sat Jun 25 07:50:10 UTC 2011
>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 <unistd.h>
+ #  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 <unistd.h>
- 
- #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 <unistd.h>
+ 
+ #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 <ctype.h>
++#include <string.h>
+ #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:
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sat Jun 25 07:47:04 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=158270 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/158270: commit references a PR
Date: Sat, 25 Jun 2011 07:47:06 +0000 (UTC)

 miwi        2011-06-25 07:46:56 UTC
 
   FreeBSD ports repository
 
   Modified files:
     cad/spice/files      patch-src_bin_sconvert_c 
                          patch-src_include_misc_h 
   Added files:
     cad/spice/files      patch-src_bin_help.c patch-src_bin_main.c 
                          patch-src_bin_procmod.c 
                          patch-src_include_fteext.h 
                          patch-src_lib_cp_unixcom.c 
                          patch-src_lib_mfb_mfbcaps.c 
   Removed files:
     cad/spice/files      patch-src-lib-mfb-mfbcaps.c 
                          patch-src_lib_cp_cshpar_c 
   Log:
   - Fix build with CLANG
   
   PR:             158270
   Submitted by:   Pedro Giffuni <giffunip@tutopia.com> (maintainer)
   
   Revision  Changes    Path
   1.2       +0 -14     ports/cad/spice/files/patch-src-lib-mfb-mfbcaps.c (dead)
   1.1       +11 -0     ports/cad/spice/files/patch-src_bin_help.c (new)
   1.1       +11 -0     ports/cad/spice/files/patch-src_bin_main.c (new)
   1.1       +11 -0     ports/cad/spice/files/patch-src_bin_procmod.c (new)
   1.2       +11 -2     ports/cad/spice/files/patch-src_bin_sconvert_c
   1.1       +11 -0     ports/cad/spice/files/patch-src_include_fteext.h (new)
   1.3       +14 -4     ports/cad/spice/files/patch-src_include_misc_h
   1.2       +0 -10     ports/cad/spice/files/patch-src_lib_cp_cshpar_c (dead)
   1.1       +10 -0     ports/cad/spice/files/patch-src_lib_cp_unixcom.c (new)
   1.1       +22 -0     ports/cad/spice/files/patch-src_lib_mfb_mfbcaps.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
