File ploticus-2.41-implicit-fortify-decl.patch of Package ploticus

From: Andreas Stieger <andreas.stieger@gmx.de>
Date: Sun, 2 Jun 2013 20:40:00 +0100 (BST)
Subject: [patch] fix implicit definitions of functions
Upstream: submitted

fix some openSUSE build warnings

[  155s] I: Program is using implicit definitions of functions getting
[  155s]    pointers or implemented by macros. These functions need to use their
[  155s]    correct prototypes to allow correct argument passing on e.g. x86_64 .
[  155s]      - Implicit memory/string functions need #include <string.h>.
[  155s]      - Implicit *printf functions need #include <stdio.h>.
[  155s]      - Implicit *printf functions need #include <stdio.h>.
[  155s]      - Implicit *read* functions need #include <unistd.h>.
[  155s]      - Implicit *recv* functions need #include <sys/socket.h>.
[  155s] W: ploticus implicit-pointer-decl dbl2png.c:274
[  155s] W: ploticus implicit-pointer-decl png2dbl.c:353
[  155s] 
[  155s] I: Program is likely to break with new gcc. Try -fno-strict-aliasing.
[  155s] W: ploticus strict-aliasing-punning read.c:134, 146
[  155s] 
[  155s] I: Program is using implicit definitions of special functions.
[  155s]    these functions need to use their correct prototypes to allow
[  155s]    the lightweight buffer overflow checking to work.
[  155s]      - Implicit memory/string functions need #include <string.h>.
[  155s]      - Implicit *printf functions need #include <stdio.h>.
[  155s]      - Implicit *printf functions need #include <stdio.h>.
[  155s]      - Implicit *read* functions need #include <unistd.h>.
[  155s]      - Implicit *recv* functions need #include <sys/socket.h>.
[  155s] E: ploticus implicit-fortify-decl dbl2png.c:258, 267
[  155s] E: ploticus implicit-fortify-decl png2dbl.c:245, 272, 337, 346
[  155s] E: ploticus implicit-fortify-decl pngdbl.c:97, 278


---
 ming-0.4.4/src/blocks/pngdbl.c |    4 ++++
 ming-0.4.4/util/dbl2png.c      |    3 +++
 ming-0.4.4/util/png2dbl.c      |    3 +++
 3 files changed, 10 insertions(+)

Index: pl241src/ming-0.4.4/src/blocks/pngdbl.c
===================================================================
--- pl241src.orig/ming-0.4.4/src/blocks/pngdbl.c	2013-06-02 20:38:06.000000000 +0100
+++ pl241src/ming-0.4.4/src/blocks/pngdbl.c	2013-06-02 20:38:10.000000000 +0100
@@ -1,3 +1,7 @@
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/socket.h>
 
 #include "libming.h"
 #include "ming_config.h"
Index: pl241src/ming-0.4.4/util/dbl2png.c
===================================================================
--- pl241src.orig/ming-0.4.4/util/dbl2png.c	2013-06-02 20:38:06.000000000 +0100
+++ pl241src/ming-0.4.4/util/dbl2png.c	2013-06-02 20:38:10.000000000 +0100
@@ -1,6 +1,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/socket.h>
 
 #include <ming_config.h>
 
Index: pl241src/ming-0.4.4/util/png2dbl.c
===================================================================
--- pl241src.orig/ming-0.4.4/util/png2dbl.c	2013-06-02 20:38:06.000000000 +0100
+++ pl241src/ming-0.4.4/util/png2dbl.c	2013-06-02 20:42:18.000000000 +0100
@@ -2,6 +2,9 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <math.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/socket.h>
 
 #include <ming_config.h>
 
openSUSE Build Service is sponsored by