[Pinfo-devel] r298 - pinfo/trunk/src

Bas Zoetekouw bas at costa.debian.org
Thu Mar 16 15:07:39 UTC 2006


Author: bas
Date: 2006-03-16 15:07:38 +0000 (Thu, 16 Mar 2006)
New Revision: 298

Modified:
   pinfo/trunk/src/filehandling_functions.c
   pinfo/trunk/src/mainfunction.c
Log:
Fixed compiler warnings


Modified: pinfo/trunk/src/filehandling_functions.c
===================================================================
--- pinfo/trunk/src/filehandling_functions.c	2006-03-16 15:00:53 UTC (rev 297)
+++ pinfo/trunk/src/filehandling_functions.c	2006-03-16 15:07:38 UTC (rev 298)
@@ -579,7 +579,7 @@
 	char *bufend;			/* points at the trailing 0 of initial name */
 	char command[1128];		/* holds command to evaluate for decompression of file */
 	int i, j;
-	char *tmpfilename;
+	char *tmpfilename = NULL;
 	int *fileendentries = xmalloc(infopathcount * sizeof(int));
 	int dir_found = 0;
 	int dircount = 0;
@@ -845,7 +845,7 @@
 {
 	int len = strlen(filename);
 	int i, pos;
-	char tmp;
+	char tmp = '\0';
 	for (i = len; i >= 0; i--)
 	{
 		if (filename[i] == '/')

Modified: pinfo/trunk/src/mainfunction.c
===================================================================
--- pinfo/trunk/src/mainfunction.c	2006-03-16 15:00:53 UTC (rev 297)
+++ pinfo/trunk/src/mainfunction.c	2006-03-16 15:07:38 UTC (rev 298)
@@ -55,7 +55,8 @@
 	int key = 0;
 	int return_value;
 	int statusline = FREE;
-	char *token, *tmp;
+	char *token;
+	char *tmp = NULL;
 	if (rval.file)		/* if the static variable was allocated, free it */
 	{
 		xfree(rval.file);
@@ -330,7 +331,7 @@
 				return_value = -1;
 				if (indirect)	/* the info is of indirect type; we'll search through several files */
 				{
-					FILE *fd;
+					FILE *fd = NULL;
 					long tokenpos;
 					long starttokenpos;
 					long filelen;




More information about the Pinfo-devel mailing list