Commit 9807ff00 authored by Bernhard Link's avatar Bernhard Link

Add several small patches to get rid of some warnings

parents f910b06d 9e96a6ef
# see git-dpm(1) from git-dpm package
e1e19f3f0af96a6556d7d4d1946e1f77b8cd279f
e1e19f3f0af96a6556d7d4d1946e1f77b8cd279f
9e96a6efcb32d4b8f89a02b8168645654366ecb7
9e96a6efcb32d4b8f89a02b8168645654366ecb7
e1e19f3f0af96a6556d7d4d1946e1f77b8cd279f
e1e19f3f0af96a6556d7d4d1946e1f77b8cd279f
gv_3.6.91.orig.tar.gz
......
From 9c7565718a0a4531b4dc4efb2a11c2d237cc9614 Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Thu, 3 Jun 2010 17:15:33 +0200
Subject: fix typos
---
doc/gv-update-userconfig.1 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/gv-update-userconfig.1 b/doc/gv-update-userconfig.1
index 4b8b9a4..ce6f818 100644
--- a/doc/gv-update-userconfig.1
+++ b/doc/gv-update-userconfig.1
@@ -43,8 +43,8 @@ removes navigation resources from \fI~\fP\fB/.gv\fP and therefore enables
standard navigation.
.TP
\fB\-i\fR
-updates translation file. Using the optional filename parameter is stroingly
-recommanded for using this option. This option cannot be used together with any of
+updates translation file. Using the optional filename parameter is strongly
+recommended for using this option. This option cannot be used together with any of
the other options.
--
1.5.6.5
From 5d7d0d07e4af1b3e4bd4cea50225a6659b70db0f Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Thu, 3 Jun 2010 17:40:31 +0200
Subject: proper prototype for clean_safe_tempdir
---
src/actions.c | 2 +-
src/actions.h | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/actions.c b/src/actions.c
index 2305416..e2e667d 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1178,7 +1178,7 @@ action_watchFile(w, event, params, num_params)
void
-clean_safe_tempdir()
+clean_safe_tempdir(void)
{
if (gv_safe_gs_tempdir)
{
diff --git a/src/actions.h b/src/actions.h
index 5f0773c..d9ee19a 100644
--- a/src/actions.h
+++ b/src/actions.h
@@ -294,4 +294,6 @@ extern void action_watchFile (
#endif
);
+extern void clean_safe_tempdir(void);
+
#endif /* _GV_ACTIONS_H_ */
--
1.5.6.5
From 669dd7ede42cab7a3b756809e3e2e6ecb754c992 Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Thu, 3 Jun 2010 17:48:53 +0200
Subject: add more includes to fix warnings about missing prototypes
---
src/Ghostview.c | 1 +
src/Scrollbar.c | 1 +
src/actions.c | 1 +
src/gv_signal.c | 6 ++++--
src/ps.c | 1 +
5 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/Ghostview.c b/src/Ghostview.c
index 5bc52fb..cb5fc56 100644
--- a/src/Ghostview.c
+++ b/src/Ghostview.c
@@ -63,6 +63,7 @@
#include "main_resources.h"
#include "main_globals.h"
#include "misc.h"
+#include "actions.h"
#include "resource.h"
diff --git a/src/Scrollbar.c b/src/Scrollbar.c
index cf22db7..27201f1 100644
--- a/src/Scrollbar.c
+++ b/src/Scrollbar.c
@@ -48,6 +48,7 @@
#include INC_XAW(XawInit.h)
#include INC_XMU(Drawing.h)
#include "ScrollbarP.h"
+#include "actions.h"
/* Private definitions. */
diff --git a/src/actions.c b/src/actions.c
index e2e667d..38e58fa 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <math.h>
#include <inttypes.h>
diff --git a/src/gv_signal.c b/src/gv_signal.c
index 5181ec2..7acb727 100644
--- a/src/gv_signal.c
+++ b/src/gv_signal.c
@@ -39,9 +39,10 @@
#include "message.h"
#include <stdio.h>
-#include <gv_signal.h>
+#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <stdlib.h>
#include "paths.h"
#include INC_X11(Intrinsic.h)
@@ -62,7 +63,8 @@
#include "d_memdebug.h"
#include "main_resources.h"
#include "main_globals.h"
-#include "signal.h"
+#include "gv_signal.h"
+#include "actions.h"
#ifdef SIGNALRETURNSINT
# define SIGVAL int
diff --git a/src/ps.c b/src/ps.c
index d637064..34f6e30 100644
--- a/src/ps.c
+++ b/src/ps.c
@@ -97,6 +97,7 @@
#include "misc.h"
#include "ps.h"
#include "note.h"
+#include "actions.h"
#include "d_memdebug.h"
extern Media *gv_medias;
extern String gv_pdf_password;
--
1.5.6.5
From bdbd93b4e2828e8ec4136e3c6cfe4ea875f9543e Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Thu, 3 Jun 2010 17:50:43 +0200
Subject: remove some unused variables
---
src/misc.c | 1 -
src/resource.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/misc.c b/src/misc.c
index 0b23d2d..7e39964 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -409,7 +409,6 @@ String misc_changeFile(name)
String error=NULL;
char *p;
Boolean b = False;
- char *dir, *q;
BEGINMESSAGE(misc_changeFile)
diff --git a/src/resource.c b/src/resource.c
index 37f70e4..426b94d 100644
--- a/src/resource.c
+++ b/src/resource.c
@@ -142,7 +142,6 @@ resource_buildDatabase (
char* locale;
int i18n;
char tmp[GV_MAX_FILENAME_LENGTH];
- char tmp2[1000];
char locale1[100], locale2[100], locale3[100];
char loc_lang[100], loc_terr[100], loc_cs[100], loc_mod[100];
--
1.5.6.5
From 9e96a6efcb32d4b8f89a02b8168645654366ecb7 Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Thu, 3 Jun 2010 17:52:44 +0200
Subject: make getI18N static as only used inside resource.c
---
src/gv-i18n.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gv-i18n.pl b/src/gv-i18n.pl
index a44fe9d..b856a88 100644
--- a/src/gv-i18n.pl
+++ b/src/gv-i18n.pl
@@ -22,7 +22,7 @@ for $lang (@languages)
print "0};\n\n";
}
-print "String* getI18N(char* locale)\n{\n";
+print "static String* getI18N(char* locale)\n{\n";
for $lang (@languages)
{
next if $lang !~ m/((\.dat)|(\.lnk))$/;
--
1.5.6.5
0001-fix-typos.patch
0002-proper-prototype-for-clean_safe_tempdir.patch
0003-add-more-includes-to-fix-warnings-about-missing-prot.patch
0004-remove-some-unused-variables.patch
0005-make-getI18N-static-as-only-used-inside-resource.c.patch
......@@ -43,8 +43,8 @@ removes navigation resources from \fI~\fP\fB/.gv\fP and therefore enables
standard navigation.
.TP
\fB\-i\fR
updates translation file. Using the optional filename parameter is stroingly
recommanded for using this option. This option cannot be used together with any of
updates translation file. Using the optional filename parameter is strongly
recommended for using this option. This option cannot be used together with any of
the other options.
......
......@@ -63,6 +63,7 @@
#include "main_resources.h"
#include "main_globals.h"
#include "misc.h"
#include "actions.h"
#include "resource.h"
......
......@@ -48,6 +48,7 @@
#include INC_XAW(XawInit.h)
#include INC_XMU(Drawing.h)
#include "ScrollbarP.h"
#include "actions.h"
/* Private definitions. */
......
......@@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <inttypes.h>
......@@ -1178,7 +1179,7 @@ action_watchFile(w, event, params, num_params)
void
clean_safe_tempdir()
clean_safe_tempdir(void)
{
if (gv_safe_gs_tempdir)
{
......
......@@ -294,4 +294,6 @@ extern void action_watchFile (
#endif
);
extern void clean_safe_tempdir(void);
#endif /* _GV_ACTIONS_H_ */
......@@ -22,7 +22,7 @@ for $lang (@languages)
print "0};\n\n";
}
print "String* getI18N(char* locale)\n{\n";
print "static String* getI18N(char* locale)\n{\n";
for $lang (@languages)
{
next if $lang !~ m/((\.dat)|(\.lnk))$/;
......
......@@ -39,9 +39,10 @@
#include "message.h"
#include <stdio.h>
#include <gv_signal.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include "paths.h"
#include INC_X11(Intrinsic.h)
......@@ -62,7 +63,8 @@
#include "d_memdebug.h"
#include "main_resources.h"
#include "main_globals.h"
#include "signal.h"
#include "gv_signal.h"
#include "actions.h"
#ifdef SIGNALRETURNSINT
# define SIGVAL int
......
......@@ -409,7 +409,6 @@ String misc_changeFile(name)
String error=NULL;
char *p;
Boolean b = False;
char *dir, *q;
BEGINMESSAGE(misc_changeFile)
......
......@@ -97,6 +97,7 @@
#include "misc.h"
#include "ps.h"
#include "note.h"
#include "actions.h"
#include "d_memdebug.h"
extern Media *gv_medias;
extern String gv_pdf_password;
......
......@@ -142,7 +142,6 @@ resource_buildDatabase (
char* locale;
int i18n;
char tmp[GV_MAX_FILENAME_LENGTH];
char tmp2[1000];
char locale1[100], locale2[100], locale3[100];
char loc_lang[100], loc_terr[100], loc_cs[100], loc_mod[100];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment