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

View File

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