* lib/trim.c (IF_LINT): Define.
(trim2): Use it to void a "may be used uninitialized" warning.
2008-05-19 Jim Meyering <meyering@redhat.com>
+ avoid a warning from gcc
+ * lib/trim.c (IF_LINT): Define.
+ (trim2): Use it to void a "may be used uninitialized" warning.
+
Fix doc typo.
* doc/glibc-functions/getpass.texi (getpass): s/PATH_MAX/PASS_MAX/.
#include "xalloc.h"
+/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
char *
trim2(const char *s, int how)
{
if (how != TRIM_LEADING)
{
int state = 0;
- char *r; /* used only while state = 2 */
+ char *r IF_LINT (= NULL); /* used only while state = 2 */
mbi_init (i, d, strlen (d));