]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use IF_LINT.
authorBruno Haible <bruno@clisp.org>
Mon, 18 Dec 2006 13:00:17 +0000 (13:00 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:31 +0000 (12:14 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/fstrcmp.c

index d9917f4149ee8bd1e0df1957faddcd3fad94b0d6..0f53f863a158f3b008559602bc32fd99348ea075 100644 (file)
@@ -1,5 +1,7 @@
 2006-10-07  Bruno Haible  <bruno@clisp.org>
 
+       * lib/fstrcmp.c (IF_LINT): New macro.
+
        * lib/fstrcmp.c: Make comments and variable syntax closer to GNU
        diff's analyze.c.
 
index 4aa9c35a45d7b06071f29305e11e6cc780aebfdd..1c1fb84738a55eba9d0e48fd3466e99d84183f60 100644 (file)
 #define OFFSET_MAX \
   ((((OFFSET)1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
 
+/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+#ifndef IF_LINT
+# ifdef lint
+#  define IF_LINT(Code) Code
+# else
+#  define IF_LINT(Code) /* empty */
+# endif
+#endif
+
 /*
  * Context of comparison operation.
  */
@@ -368,13 +377,9 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal,
       if (c >= ctxt->too_expensive)
        {
          OFFSET fxybest;
-         OFFSET fxbest;
+         OFFSET fxbest IF_LINT (= 0);
          OFFSET bxybest;
-         OFFSET bxbest;
-
-         /* Pacify `gcc -Wall'. */
-         fxbest = 0;
-         bxbest = 0;
+         OFFSET bxbest IF_LINT (= 0);
 
          /* Find forward diagonal that maximizes X + Y.  */
          fxybest = -1;