Package: webalizer Version: 2.01.10-32 Severity: wishlist Tags: patch Hi,
I propose to apply this patch to fix some compiler warnings. Bye, Jörg.
From d723036d7a860fa925c200d7c359181066ed446a Mon Sep 17 00:00:00 2001 Message-Id: <d723036d7a860fa925c200d7c359181066ed446a.1259165262.git.joerg.som...@ateo.de> In-Reply-To: <ecff2b0815768dc2b1897390adc3e9e68a0c5689.1259165261.git.joerg.som...@ateo.de> References: <ecff2b0815768dc2b1897390adc3e9e68a0c5689.1259165261.git.joerg.som...@ateo.de> From: =?utf-8?q?J=C3=B6rg=20Sommer?= <jo...@alea.gnuu.de> Date: Wed, 25 Nov 2009 15:28:16 +0100 Subject: [PATCH] New patch to fix compiler warnings about return values --- debian/patches/00list | 1 + debian/patches/24_fix_return_values.dpatch | 75 ++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 0 deletions(-) create mode 100755 debian/patches/24_fix_return_values.dpatch diff --git a/debian/patches/00list b/debian/patches/00list index 8d40347..96fe752 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -21,3 +21,4 @@ 21_remove_-v_option 22_php_as_htm_in_sample.conf 23_check_sscanf_return.dpatch +24_fix_return_values.dpatch diff --git a/debian/patches/24_fix_return_values.dpatch b/debian/patches/24_fix_return_values.dpatch new file mode 100755 index 0000000..032a9a6 --- /dev/null +++ b/debian/patches/24_fix_return_values.dpatch @@ -0,0 +1,75 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 23_check_sscanf_return.dpatch by Jörg Sommer <jo...@alea.gnuu.de> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: The compiler gcc raises some warnings about return values: +## DP: webalizer.c: In function ‘main’: +## DP: webalizer.c:468: warning: ‘return’ with no value, in function returning non-void +## DP: preserve.c: In function ‘save_state’: +## DP: preserve.c:222: warning: return makes integer from pointer without a cast +## DP: graphs.c: In function ‘year_graph6x’: +## DP: graphs.c:430: warning: ‘return’ with no value, in function returning non-void +## DP: graphs.c: In function ‘month_graph6’: +## DP: graphs.c:688: warning: ‘return’ with no value, in function returning non-void +## DP: graphs.c: In function ‘pie_chart’: +## DP: graphs.c:908: warning: ‘return’ with no value, in function returning non-void + + +...@dpatch@ +diff --git a/graphs.c b/graphs.c +index 35aabb2..18a2e1d 100644 +--- a/graphs.c ++++ b/graphs.c +@@ -427,7 +427,7 @@ int year_graph6x( char *fname, /* file name use */ + { + if (verbose) + fprintf(stderr,"%s %s!\n",_("Error: File is a symlink"),fname); +- return; ++ return 1; + } + } + +@@ -685,7 +685,7 @@ int month_graph6( char *fname, /* filename */ + { + if (verbose) + fprintf(stderr,"%s %s!\n",_("Error: File is a symlink"),fname); +- return; ++ return 1; + } + } + +@@ -905,7 +905,7 @@ int pie_chart(char *fname, char *title, u_int64_t t_val, + { + if (verbose) + fprintf(stderr,"%s %s!\n",_("Error: File is a symlink"),fname); +- return; ++ return 1; + } + } + +diff --git a/preserve.c b/preserve.c +index 181a53d..177f7ff 100644 +--- a/preserve.c ++++ b/preserve.c +@@ -219,7 +219,7 @@ int save_state() + { + if (verbose) + fprintf(stderr,"%s %s!\n",_("Error: File is a symlink"),state_fname); +- return NULL; ++ return 1; + } + } + +diff --git a/webalizer.c b/webalizer.c +index 265e076..2108e99 100644 +--- a/webalizer.c ++++ b/webalizer.c +@@ -465,7 +465,7 @@ int main(int argc, char *argv[]) + { + if (verbose) + fprintf(stderr,"%s %s!\n",_("Error: File is a symlink"),log_fname); +- return; ++ return 1; + } + } + -- 1.6.3.3
signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP