PERFORCE change 140996 for review

Gabor Kovesdan gabor at FreeBSD.org
Thu May 1 17:57:43 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=140996

Change 140996 by gabor at gabor_server on 2008/05/01 17:57:13

	- Eliminate some warnings

Affected files ...

.. //depot/projects/soc2008/gabor_textproc/sort/append.c#3 edit
.. //depot/projects/soc2008/gabor_textproc/sort/fields.c#3 edit
.. //depot/projects/soc2008/gabor_textproc/sort/files.c#3 edit
.. //depot/projects/soc2008/gabor_textproc/sort/msort.c#3 edit
.. //depot/projects/soc2008/gabor_textproc/sort/sort.c#4 edit

Differences ...

==== //depot/projects/soc2008/gabor_textproc/sort/append.c#3 (text+ko) ====

@@ -68,7 +68,7 @@
     void (*put)(RECHEADER *, FILE *), struct field *ftbl)
 {
 	u_char		*wts, *wts1;
-	int		 n, odepth;
+	int		 n, odepth = depth;
 	u_char		**cpos, **ppos, **lastkey;
 	u_char		*cend, *pend, *start;
 	RECHEADER	*crec, *prec;
@@ -81,7 +81,6 @@
 			wts1 = Rascii;
 		else if (ftbl[0].flags & F)
 			wts1 = ascii;
-		odepth = depth;
 	}
 	lastkey = keylist + nelem;
 	depth += sizeof(TRECHEADER);

==== //depot/projects/soc2008/gabor_textproc/sort/fields.c#3 (text+ko) ====


==== //depot/projects/soc2008/gabor_textproc/sort/files.c#3 (text+ko) ====

@@ -285,8 +285,8 @@
 			if (!linebuf)
 				err(2, "realloc of linebuf to %lu bytes failed",
 					(unsigned long)linebuf_size);
-			end = linebuf + linebuf_size;
-			pos = linebuf + (pos - buf);
+			end = (char *) (linebuf + linebuf_size);
+			pos = (char *) (linebuf + (pos - buf));
 			line->data = buf = (char *)linebuf;
 			continue;
 		}

==== //depot/projects/soc2008/gabor_textproc/sort/msort.c#3 (text+ko) ====

@@ -256,9 +256,9 @@
 			err(2, NULL);
 	}
 	crec = (RECHEADER *) buffer;
-	crec_end = ((char *)crec) + ALIGN(MAXLLEN + sizeof(RECHEADER));
+	crec_end = ((u_char *)crec) + ALIGN(MAXLLEN + sizeof(RECHEADER));
 	prec = (RECHEADER *) crec_end;
-	prec_end = ((char *)prec) + ALIGN(MAXLLEN + sizeof(RECHEADER));
+	prec_end = ((u_char *)prec) + ALIGN(MAXLLEN + sizeof(RECHEADER));
 	wts = ftbl->weights;
 	if (SINGL_FLD && (ftbl->flags & F))
 		wts1 = ftbl->flags & R ? Rascii : ascii;

==== //depot/projects/soc2008/gabor_textproc/sort/sort.c#4 (text+ko) ====

@@ -33,7 +33,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1993\nThe Regents of the University of California.  All rights reserved.\n");
+__COPYRIGHT("@(#) Copyright (c) 1993 The Regents of the University of California.  All rights reserved.");
 #endif /* not lint */
 
 #ifndef lint


More information about the p4-projects mailing list