[LLVMbugs] [Bug 18630] New: -Wformat messages unclear on number of expected arguments vs. received arguments.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 27 10:02:27 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18630

            Bug ID: 18630
           Summary: -Wformat messages unclear on number of expected
                    arguments vs. received arguments.
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: seth.cantrell at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The code:

#include <stdio.h>
void f() {
  printf("%.*d", 1);
}

Produces a warning:

main.cpp:3:14: warning: more '%' conversions than data arguments [-Wformat]
  printf("%.*d", 1);
          ~~~^

A format message along the lines of "The specified format indicates 2 data
arguments, but only 1 is received," might be clearer.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140127/b6196432/attachment.html>


More information about the llvm-bugs mailing list