Change Error::SetErrorStringWithFormat() prototype to use an

__attribute__ format so the compiler knows that this method takes
printf style formatter arguments and checks that it's being used
correctly.  Fix a couple dozen incorrect SetErrorStringWithFormat()
calls throughout the sources.

llvm-svn: 140115
This commit is contained in:
Jason Molenda
2011-09-20 00:26:08 +00:00
parent e65c2ab453
commit 7e589a6011
10 changed files with 23 additions and 22 deletions

View File

@@ -865,7 +865,7 @@ ModuleList::GetSharedModule
if (arch.IsValid())
{
if (uuid_cstr[0])
error.SetErrorStringWithFormat("'%s' does not contain the %s architecture and UUID %s.\n", path, arch.GetArchitectureName(), uuid_cstr[0]);
error.SetErrorStringWithFormat("'%s' does not contain the %s architecture and UUID %s.\n", path, arch.GetArchitectureName(), uuid_cstr);
else
error.SetErrorStringWithFormat("'%s' does not contain the %s architecture.\n", path, arch.GetArchitectureName());
}
@@ -941,9 +941,9 @@ ModuleList::GetSharedModule
uuid_cstr[0] = '\0';
if (uuid_cstr[0])
error.SetErrorStringWithFormat("Cannot locate a module for UUID '%s'.\n", uuid_cstr[0]);
error.SetErrorStringWithFormat("Cannot locate a module for UUID '%s'.\n", uuid_cstr);
else
error.SetErrorStringWithFormat("Cannot locate a module.\n", path, arch.GetArchitectureName());
error.SetErrorStringWithFormat("Cannot locate a module.\n");
}
}
}