The 'trim' function gives warnings on NetBSD 3.0: trim.c:116: warning: subscript has type `char' trim.c:124: warning: subscript has type `char'
It's actually a bug: 'char' values must be casted to 'unsigned char' before being usable as argument to <ctype.h> functions. This fixes it. 2008-04-15 Bruno Haible <[EMAIL PROTECTED]> * lib/trim.c (trim2): Fix argument of isspace() macro. --- lib/trim.c.orig 2008-04-16 03:25:52.000000000 +0200 +++ lib/trim.c 2008-04-16 03:21:05.000000000 +0200 @@ -113,7 +113,7 @@ /* Trim leading whitespaces. */ if (how != TRIM_TRAILING) { - for (p = d; *p && isspace (*p); p++) + for (p = d; *p && isspace ((unsigned char) *p); p++) ; memmove (d, p, strlen (p) + 1); @@ -121,7 +121,7 @@ /* Trim trailing whitespaces. */ if (how != TRIM_LEADING) { - for (p = d + strlen (d) - 1; p >= d && isspace (*p); p--) + for (p = d + strlen (d) - 1; p >= d && isspace ((unsigned char) *p); p--) *p = '\0'; } }