1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

(OSX/LibretroDB) Silence all warnings

This commit is contained in:
Twinaphex 2015-01-20 01:25:34 +01:00
parent 32391a4b3e
commit 0e7a9739f0
2 changed files with 42 additions and 7 deletions

View File

@ -38,7 +38,11 @@ static void raise_expected_number(
snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Expected number",
#ifdef _WIN32
"%I64u::Expected number",
#else
"%llu::Expected number",
#endif
where
);
*error = tmp_error_buff;
@ -51,7 +55,11 @@ static void raise_expected_string(
snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Expected string",
#ifdef _WIN32
"%I64u::Expected string",
#else
"%llu::Expected string",
#endif
where
);
*error = tmp_error_buff;
@ -64,7 +72,11 @@ static void raise_unexpected_eof(
snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Unexpected EOF",
#ifdef _WIN32
"%I64u::Unexpected EOF",
#else
"%llu::Unexpected EOF",
#endif
where
);
*error = tmp_error_buff;
@ -88,7 +100,11 @@ static void raise_unknown_function(
int n = snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Unknown function '",
#ifdef _WIN32
"%I64u::Unknown function '",
#else
"%llu::Unknown function '",
#endif
where
);
if (len < (MAX_ERROR_LEN - n - 3)) {
@ -105,7 +121,11 @@ static void raise_expected_eof(
snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Expected EOF found '%c'",
#ifdef _WIN32
"%I64u::Expected EOF found '%c'",
#else
"%llu::Expected EOF found '%c'",
#endif
where,
found
);
@ -121,7 +141,11 @@ static void raise_unexpected_char(
snprintf(
tmp_error_buff,
MAX_ERROR_LEN,
"%lu::Expected '%c' found '%c'",
#ifdef _WIN32
"%I64u::Expected '%c' found '%c'",
#else
"%llu::Expected '%c' found '%c'",
#endif
where,
expected,
found
@ -554,7 +578,14 @@ static struct buffer parse_integer(
const char ** error
) {
value->type = RDT_INT;
if (sscanf(buff.data + buff.offset, "%ld", &value->int_) == 0) {
if (sscanf(buff.data + buff.offset,
#ifdef _WIN32
"%I64d",
#else
"%lld",
#endif
&value->int_) == 0)
{
raise_expected_number(buff.offset, error);
} else {
while (isdigit(buff.data[buff.offset])) {

View File

@ -56,7 +56,11 @@ int rarchdb_cursor_open(
struct rarchdb_cursor * cursor,
rarchdb_query * query
);
int rarchdb_cursor_reset(struct rarchdb_cursor * cursor);
void rarchdb_cursor_close(struct rarchdb_cursor * cursor);
rarchdb_query * rarchdb_query_compile(
struct rarchdb * db,
const char * query,