]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
pr: avoid -Wsign-compare warnings
authorPádraig Brady <P@draigBrady.com>
Thu, 15 Jan 2009 17:32:31 +0000 (17:32 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 16 Jan 2009 11:06:09 +0000 (11:06 +0000)
* src/pr.c: Use unsigned variables in unsigned comparisons.

src/pr.c

index d2b6714e0f3232a1cc36c5ef0db69c5dfdcdef4d..308a02570612fa11b236e71d7d7c37ed61493eaf 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -1,5 +1,5 @@
 /* pr -- convert text files for printing.
-   Copyright (C) 88, 91, 1995-2008 Free Software Foundation, Inc.
+   Copyright (C) 88, 91, 1995-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -455,7 +455,7 @@ static char *buff;
 
 /* Index of the position in buff where the next character
    will be stored. */
-static int buff_current;
+static unsigned int buff_current;
 
 /* The number of characters in buff.
    Used for allocation of buff and to detect overflow of buff. */
@@ -1944,8 +1944,8 @@ static void
 store_columns (void)
 {
   int i, j;
-  int line = 0;
-  int buff_start;
+  unsigned int line = 0;
+  unsigned int buff_start;
   int last_col;                /* The rightmost column which will be saved in buff */
   COLUMN *p;