rpms/MagicPoint/devel magicpoint-1.11b-missing-protos.patch, NONE, 1.1 MagicPoint.spec, 1.7, 1.8

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sun Mar 30 20:20:30 UTC 2008


Author: jwrdegoede

Update of /cvs/extras/rpms/MagicPoint/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8231

Modified Files:
	MagicPoint.spec 
Added Files:
	magicpoint-1.11b-missing-protos.patch 
Log Message:
* Sun Mar 30 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 1.11b-6
- Fix missing prototype compiler warnings


magicpoint-1.11b-missing-protos.patch:

--- NEW FILE magicpoint-1.11b-missing-protos.patch ---
diff -up magicpoint-1.11b/image/path.c~ magicpoint-1.11b/image/path.c
--- magicpoint-1.11b/image/path.c~	2008-03-30 22:02:58.000000000 +0200
+++ magicpoint-1.11b/image/path.c	2008-03-30 22:02:58.000000000 +0200
@@ -20,9 +20,7 @@
 #if 1 /* SYSV */
 #include <unistd.h>
 #endif
-#ifdef __APPLE__
 #include <stdlib.h>
-#endif
 
 /* SUPPRESS 530 */
 /* SUPPRESS 560 */
diff -up magicpoint-1.11b/image/window.c~ magicpoint-1.11b/image/window.c
--- magicpoint-1.11b/image/window.c~	2008-03-30 22:04:06.000000000 +0200
+++ magicpoint-1.11b/image/window.c	2008-03-30 22:05:22.000000000 +0200
@@ -16,7 +16,7 @@
 #include <signal.h>
 #include <errno.h>
 #include <sys/types.h>
-#ifdef SYSV
+#if 1 /* SYSV */
 #include <unistd.h>
 #endif
 #if TIME_WITH_SYS_TIME
diff -up magicpoint-1.11b/image/misc.c~ magicpoint-1.11b/image/misc.c
--- magicpoint-1.11b/image/misc.c~	2008-03-30 22:01:28.000000000 +0200
+++ magicpoint-1.11b/image/misc.c	2008-03-30 22:01:28.000000000 +0200
@@ -12,9 +12,7 @@
 #include "xloadimage.h"
 #include "patchlevel"
 #include <signal.h>
-#ifdef __APPLE__
 #include <stdlib.h>
-#endif
 
 extern int      _Xdebug;
 extern Display *display;
diff -up magicpoint-1.11b/draw.c~ magicpoint-1.11b/draw.c
--- magicpoint-1.11b/draw.c~	2008-03-30 21:50:02.000000000 +0200
+++ magicpoint-1.11b/draw.c	2008-03-30 21:50:02.000000000 +0200
@@ -2660,7 +2660,7 @@ x_setfont(xfont, csize, registry, truesc
 			fprintf(stderr, "using best [%d] <%s>\n",
 				best, fontlist[best]);
 		}
-		strlcpy(fontstring, fontlist[best], sizeof(fontstring));
+		snprintf(fontstring, sizeof(fontstring), "%s", fontlist[best]);
 	} else if (scalable >= 0 || tscalable >= 0) {
 		x_fontname(fontstring, sizeof(fontstring), xfont, csize,
 		    registry);
@@ -4911,23 +4911,23 @@ xft_setfont(xfontarg, csize, registry)
 	 */
 	if ((p = strchr(xfont, '-')) != NULL) {
 		*p++ = 0;
-		strlcpy(font, xfont, sizeof(font));
+		snprintf(font, sizeof(font), "%s", xfont);
 		if (strncmp(p, "bold-i", 6) == 0)
-			strlcpy(style, "Bold Italic", sizeof(style));
+			snprintf(style, sizeof(style), "%s", "Bold Italic");
 		else if (strncmp(p, "bold-", 5) == 0)
-			strlcpy(style, "Bold", sizeof(style));
+			snprintf(style, sizeof(style), "%s", "Bold");
 		else if ((p = strchr(p, '-')) != NULL && p[1] == 'i')
-			strlcpy(style, "Italic", sizeof(style));
+			snprintf(style, sizeof(style), "%s", "Italic");
 	} else if ((p = strchr(xfont, ':')) == NULL)
-		strlcpy(font, xfont, sizeof(font));
+		snprintf(font, sizeof(font), "%s", xfont);
 	else {
 		p2 = p +1;
 		/* allow to use ":style=" syntax */ 
 		if ((strstr(p2, "style=") != NULL) || (strstr(p2, "STYLE=") != NULL)) 
 			p2 += 6;
 		*p = '\0';
-		strlcpy(font, xfont, sizeof(font));
-		strlcpy(style, p2, sizeof(style));
+		snprintf(font, sizeof(font), "%s", xfont);
+		snprintf(style, sizeof(style), "%s", p2);
 	}
 	if (style[0]) {
 		xftfont = XftFontOpen(display, screen,
diff -up magicpoint-1.11b/contrib/xwintoppm/dsimple.c~ magicpoint-1.11b/contrib/xwintoppm/dsimple.c
--- magicpoint-1.11b/contrib/xwintoppm/dsimple.c~	2008-03-30 22:13:20.000000000 +0200
+++ magicpoint-1.11b/contrib/xwintoppm/dsimple.c	2008-03-30 22:13:20.000000000 +0200
@@ -57,6 +57,7 @@ void blip();
 Window Window_With_Name();
 void Fatal_Error();
 void outl(char *msg, ...);
+int usage(void);
 
 /*
  * Just_display: A group of routines designed to make the writting of simple
diff -up magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c~ magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c
--- magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c~	2008-03-30 22:11:46.000000000 +0200
+++ magicpoint-1.11b/contrib/xwintoppm/xwintoppm.c	2008-03-30 22:13:40.000000000 +0200
@@ -96,6 +96,7 @@ in this Software without prior written a
 %*/
 
 #include <stdio.h>
+#include <stdarg.h>
 #include <errno.h>
 #include <X11/Xos.h>
 
@@ -125,6 +126,12 @@ typedef unsigned long Pixel;
 #include <X11/extensions/XKBbells.h>
 #endif
 
+int usage(void);
+int Error(char *);
+void outl(char *msg, ...);
+int Image_Size(XImage *image);
+int Get_XColors(XWindowAttributes *win_info, XColor **colors);
+          
 /* Setable Options */
 
 int format = ZPixmap;
diff -up magicpoint-1.11b/mgp.h~ magicpoint-1.11b/mgp.h
--- magicpoint-1.11b/mgp.h~	2008-03-30 21:59:13.000000000 +0200
+++ magicpoint-1.11b/mgp.h	2008-03-30 21:59:13.000000000 +0200
@@ -799,6 +799,7 @@ extern XImage *tfc_image __P((struct tfo
 
 /* unimap.c */
 extern void latin_unicode_map_init();
+extern void unicode_map_init();
 
 /* embed.c */
 extern char *embed_fname __P((char *));
diff -up magicpoint-1.11b/mgp.c~ magicpoint-1.11b/mgp.c
--- magicpoint-1.11b/mgp.c~	2008-03-30 21:45:20.000000000 +0200
+++ magicpoint-1.11b/mgp.c	2008-03-30 21:45:20.000000000 +0200
@@ -441,7 +441,7 @@ main(argc, argv)
     }
 
 	init_win1(xgeometry);
-	strlcpy(buf, mgp_fname, sizeof(buf));
+	snprintf(buf, sizeof(buf), "%s", mgp_fname);
 	if ((p = rindex(buf, '/'))) {
 		*p = '\0';
         	Paths[NumPaths++]= expandPath(buf);
diff -up magicpoint-1.11b/grammar.y~ magicpoint-1.11b/grammar.y
--- magicpoint-1.11b/grammar.y~	2008-03-30 22:17:54.000000000 +0200
+++ magicpoint-1.11b/grammar.y	2008-03-30 22:17:54.000000000 +0200
@@ -74,6 +74,7 @@ int n_errors = 0;
 struct ctrl *root;
 char *yyfilename;
 int yylineno;
+extern int yylex (void);
 
 #ifdef HAVE_STDARG_H
 /* GCC complains if we declare this function in traditional style */


Index: MagicPoint.spec
===================================================================
RCS file: /cvs/extras/rpms/MagicPoint/devel/MagicPoint.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MagicPoint.spec	19 Feb 2008 07:44:37 -0000	1.7
+++ MagicPoint.spec	30 Mar 2008 20:19:52 -0000	1.8
@@ -1,6 +1,6 @@
 Name:           MagicPoint
 Version:        1.11b
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        X based presentation software
 Group:          Applications/Productivity
 License:        BSD
@@ -14,6 +14,7 @@
 Patch6:         magicpoint-1.10a-longline.patch
 Patch10:        magicpoint-1.10a-fix-usleep.patch
 Patch11:        magicpoint-1.10a-fix-gcc34.patch
+Patch12:        magicpoint-1.11b-missing-protos.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  freetype1-devel libungif-devel libpng-devel libmng-devel imake
 BuildRequires:  imlib-devel libXmu-devel libXft-devel bison flex perl sharutils
@@ -37,6 +38,7 @@
 %patch6 -p1 -z .longline
 %patch10 -p1 -z .usleep
 %patch11 -p1 -z .gcc34
+%patch12 -p1
 # fix hopelessly broken way configure searches for libttf
 sed -i 's:$dir/lib:%{_libdir}:g' configure
 sed -i 's:$dir/include/freetype:/usr/include/freetype1/freetype:g' configure
@@ -75,6 +77,9 @@
 
 
 %changelog
+* Sun Mar 30 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 1.11b-6
+- Fix missing prototype compiler warnings
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.11b-5
 - Autorebuild for GCC 4.3
 




More information about the fedora-extras-commits mailing list