OSDN Git Service

* config/bfin/bfin.c (bfin_expand_builtin): Fix the argument
[pf3gnuchains/gcc-fork.git] / gcc / c-format.c
index 8a36dd4..a496541 100644 (file)
@@ -1401,21 +1401,16 @@ check_format_arg (void *ctx, tree format_tree,
       format_chars += offset;
       format_length -= offset;
     }
-  if (format_length < 1)
+  if (format_length < 1 || format_chars[--format_length] != 0)
     {
       res->number_unterminated++;
       return;
     }
-  if (format_length == 1)
+  if (format_length == 0)
     {
       res->number_empty++;
       return;
     }
-  if (format_chars[--format_length] != 0)
-    {
-      res->number_unterminated++;
-      return;
-    }
 
   /* Skip to first argument to check.  */
   while (arg_num + 1 < info->first_arg_num)