COMPILER WARNING about "data argument not used by format string"

Issue #10 closed
Samuel Cai created an issue

When checking my project, there is a compiler warning in checking log: COMPILER WARNING when parsing file /MyViewController.m: /Users/samuel/MyViewController.m:91:113: warning: data argument not used by format string [-Wformat-extra-args]

More details In code: #define SitePhoneNumber @"1-xxx-xxx-xxxx" NSString *domainName = @"domain"; NSString *testString = [NSString stringWithFormat:NSLocalizedString(@"HelperText", nil), SitePhoneNumber, domainName];

In Localizable.string: "DIYReturnsGeneralHelperText" = "test %@, %@";

Looks like it cannot detect localized string content and then thinks extra argument. Not sure if it's Faux Pas' issue, or Xcode itself, just I didn't see this warning when building in Xcode GUI.

Comments (7)

  1. Ali Rantakari repo owner

    Thanks for reporting this.

    These warnings are emitted by the version of Clang that Faux Pas uses — the version of Clang used by Xcode suppresses them. They are harmless and you can ignore them. The next version of Faux Pas will suppress these warnings as well.

  2. Log in to comment