libobs: Fix various string format warnings
GCC 5.1+ seems to be more aggressive about spotting potentially non-matching printf format specifiers.
This commit is contained in:
parent
13d22645e4
commit
46101b6d5b
@ -1615,7 +1615,7 @@ static inline char *dup_name(const char *name)
|
||||
{
|
||||
if (!name || !*name) {
|
||||
struct dstr unnamed = {0};
|
||||
dstr_printf(&unnamed, "__unnamed%004lld",
|
||||
dstr_printf(&unnamed, "__unnamed%04lld",
|
||||
obs->data.unnamed_index++);
|
||||
|
||||
return unnamed.array;
|
||||
|
@ -14,6 +14,7 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include "config-file.h"
|
||||
@ -510,7 +511,7 @@ void config_set_int(config_t *config, const char *section,
|
||||
{
|
||||
struct dstr str;
|
||||
dstr_init(&str);
|
||||
dstr_printf(&str, "%lld", value);
|
||||
dstr_printf(&str, "%"PRId64, value);
|
||||
config_set_item(&config->sections, section, name, str.array);
|
||||
}
|
||||
|
||||
@ -519,7 +520,7 @@ void config_set_uint(config_t *config, const char *section,
|
||||
{
|
||||
struct dstr str;
|
||||
dstr_init(&str);
|
||||
dstr_printf(&str, "%llu", value);
|
||||
dstr_printf(&str, "%"PRIu64, value);
|
||||
config_set_item(&config->sections, section, name, str.array);
|
||||
}
|
||||
|
||||
@ -551,7 +552,7 @@ void config_set_default_int(config_t *config, const char *section,
|
||||
{
|
||||
struct dstr str;
|
||||
dstr_init(&str);
|
||||
dstr_printf(&str, "%lld", value);
|
||||
dstr_printf(&str, "%"PRId64, value);
|
||||
config_set_item(&config->defaults, section, name, str.array);
|
||||
}
|
||||
|
||||
@ -560,7 +561,7 @@ void config_set_default_uint(config_t *config, const char *section,
|
||||
{
|
||||
struct dstr str;
|
||||
dstr_init(&str);
|
||||
dstr_printf(&str, "%llu", value);
|
||||
dstr_printf(&str, "%"PRIu64, value);
|
||||
config_set_item(&config->defaults, section, name, str.array);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <inttypes.h>
|
||||
#include "profiler.h"
|
||||
|
||||
#include "darray.h"
|
||||
@ -977,7 +978,8 @@ static void entry_dump_csv(struct dstr *buffer,
|
||||
const char *parent_name = parent ? parent->name : NULL;
|
||||
|
||||
for (size_t i = 0; i < entry->times.num; i++) {
|
||||
dstr_printf(buffer, "%p,%p,%p,%p,%s,0,%llu,%llu\n", entry,
|
||||
dstr_printf(buffer, "%p,%p,%p,%p,%s,0,"
|
||||
"%"PRIu64",%"PRIu64"\n", entry,
|
||||
parent, entry->name, parent_name, entry->name,
|
||||
entry->times.array[i].time_delta,
|
||||
entry->times.array[i].count);
|
||||
@ -985,7 +987,8 @@ static void entry_dump_csv(struct dstr *buffer,
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < entry->times_between_calls.num; i++) {
|
||||
dstr_printf(buffer, "%p,%p,%p,%p,%s,%llu,%llu,%llu\n", entry,
|
||||
dstr_printf(buffer,"%p,%p,%p,%p,%s,"
|
||||
"%"PRIu64",%"PRIu64",%"PRIu64"\n", entry,
|
||||
parent, entry->name, parent_name, entry->name,
|
||||
entry->expected_time_between_calls,
|
||||
entry->times_between_calls.array[i].time_delta,
|
||||
|
Loading…
x
Reference in New Issue
Block a user