From: Robert Luberda <robert@debian.org>
Date: Sun, 9 Jan 2011 18:07:08 +0100
Subject: 033 gcc warnings

Fix some gcc warnings.
---
 man2html/cgibase.c  |  6 +++---
 man2html/man2html.c | 24 ++++++++++++------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/man2html/cgibase.c b/man2html/cgibase.c
index 72da527..b296c1d 100644
--- a/man2html/cgibase.c
+++ b/man2html/cgibase.c
@@ -82,13 +82,13 @@ void print_sig()
 {
     char timebuf[TIMEBUFSZ];
     struct tm *timetm;
-    time_t clock;
+    time_t now;
 
     timebuf[0] = 0;
 #ifdef TIMEFORMAT
     sprintf(timebuf, "Time: ");
-    clock=time(NULL);
-    timetm=gmtime(&clock);
+    now=time(NULL);
+    timetm=gmtime(&now);
     strftime(timebuf+6, TIMEBUFSZ-6, TIMEFORMAT, timetm);
     timebuf[TIMEBUFSZ-1] = 0;
 #endif
diff --git a/man2html/man2html.c b/man2html/man2html.c
index e291536..8af8d4a 100644
--- a/man2html/man2html.c
+++ b/man2html/man2html.c
@@ -644,7 +644,7 @@ scan_escape(char *c) {
 		*tmp = 0;
 			
 		for (i = 0; ((h = argument[i])); i++) {
-			sprintf(tmp, "%s %s%s%s", tmp,
+			sprintf(tmp + strlen(tmp), " %s%s%s",
 						  quote ? "\"" : "",
 						  h,
 						  quote ? "\"" : "");
@@ -1720,12 +1720,12 @@ scan_request(char *c) {
 		for (i=1; i<words; i++)
 		    wordlist[i][-1]=0;
 		for (i=0; i<words; i++) {
-		    char *h=NULL;
+		    char *hl=NULL;
 		    if (mandoc_command)
-			 scan_troff_mandoc(wordlist[i],1,&h);
+			 scan_troff_mandoc(wordlist[i],1,&hl);
 		    else
-			 scan_troff(wordlist[i],2,&h);
-		    wordlist[i]=h;
+			 scan_troff(wordlist[i],2,&hl);
+		    wordlist[i]=hl;
 		}
 		for (i=words; i<SIZE(wordlist); i++)
 		    wordlist[i]=NULL;
@@ -1806,24 +1806,24 @@ scan_request(char *c) {
 		single_escape=1;
 		curpos=0;
 		if (!de) {
-		    char *h;
+		    char *hl;
 		    de=(STRDEF*) xmalloc(sizeof(STRDEF));
 		    de->nr=i;
 		    de->slen=0;
 		    de->next=strdef;
 		    de->st=NULL;
 		    strdef=de;
-		    h=NULL;
-		    c=scan_troff(c, 1, &h);
-		    de->st=h;
+		    hl=NULL;
+		    c=scan_troff(c, 1, &hl);
+		    de->st=hl;
 		    de->slen=curpos;
 		} else {
 		    if (mode) {		/* .ds */
-			char *h=NULL;
-			c=scan_troff(c, 1, &h);
+			char *hl=NULL;
+			c=scan_troff(c, 1, &hl);
 			free(de->st);	/* segfault XXX */
 			de->slen=curpos;
-			de->st=h;
+			de->st=hl;
 		    } else {		/* .as */
 			c=scan_troff(c,1,&de->st); 	/* XXX */
 			de->slen+=curpos;
