* lib/getndelim2.c (IF_LINT): Define.
(getndelim2): Use it to void a "may be used uninitialized" warning.
Signed-off-by: Jim Meyering <meyering@redhat.com>
2008-04-30 Jim Meyering <meyering@redhat.com>
+ avoid a warning from gcc
+ * lib/getndelim2.c (IF_LINT): Define.
+ (getndelim2): Use it to void a "may be used uninitialized" warning.
+
vc-list-files: work properly with build-aux/cvsu, too
* build-aux/vc-list-files: Hoist the "./"-removing code to apply
to all cvs-based clauses.
# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
+/* 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
+
/* The maximum value that getndelim2 can return without suffering from
overflow problems, either internally (because of pointer
subtraction overflow) or due to the API (because of ssize_t). */
{
/* Here always ptr + size == read_pos + nbytes_avail. */
- int c;
+ int c IF_LINT (= 0);
const char *buffer;
size_t buffer_len;