[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for locate.c

From: Jim Meyering
Subject: patch for locate.c
Date: Thu, 01 Sep 2005 22:01:58 +0200

Compiling the fts-conversion (ran `cvs update' just before)
branch code on a 64-bit sytem, I got this warning from gcc:

  locate.c:939: warning: assignment from incompatible pointer type

That referred to the following line, where the .soffs member has
type size_t and the .count one is of type int:

    casebuf.soffs = &procdata.count;

But that .soffs member is never used, so the fix is easy: remove it.

2005-09-01  Jim Meyering  <address@hidden>

        * locate/locate.c (struct stringbuf) [soffs]: Remove unused member.
        (locate): Remove initialization, too.

Index: locate/locate.c
RCS file: /cvsroot/findutils/findutils/locate/locate.c,v
retrieving revision 1.57
diff -u -p -r1.57 locate.c
--- locate/locate.c     3 Jul 2005 15:03:16 -0000       1.57
+++ locate/locate.c     1 Sep 2005 19:59:27 -0000
@@ -292,7 +292,6 @@ struct stringbuf
   char *buffer;
   size_t buffersize;
-  size_t *soffs;
   size_t *preqlen;
 static struct stringbuf casebuf;
@@ -936,7 +935,6 @@ locate (int argc,
       add_visitor(visit_casefold, &casebuf);
       casebuf.preqlen = &procdata.pathsize;
-      casebuf.soffs = &procdata.count;
   /* Add an inspector for each pattern we're looking for. */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]