Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index 4d28c04..6a70d4d 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -1465,7 +1465,7 @@
off_t value_alignment = (ast_context->getTypeAlign(qual_type) + 7) / 8;
if (log)
- log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %d, align %d]",
+ log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %lu, align %lld]",
name.c_str(),
qual_type.getAsString().c_str(),
PrintType(value_type).c_str(),
@@ -1815,7 +1815,7 @@
}
ss.flush();
- log->Printf("Found ConstantFP with size %d and raw data %s", operand_data_size, s.c_str());
+ log->Printf("Found ConstantFP with size %lu and raw data %s", operand_data_size, s.c_str());
}
lldb_private::DataBufferHeap data(operand_data_size, 0);
@@ -2186,7 +2186,7 @@
}
if (log)
- log->Printf(" \"%s\" [\"%s\"] (\"%s\") placed at %d",
+ log->Printf(" \"%s\" [\"%s\"] (\"%s\") placed at %lld",
value->getName().str().c_str(),
name.GetCString(),
PrintValue(value, true).c_str(),
@@ -2225,7 +2225,7 @@
}
if (log)
- log->Printf("Total structure [align %d, size %d]", alignment, size);
+ log->Printf("Total structure [align %lld, size %lu]", alignment, size);
return true;
}