mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 14:54:10 +00:00
(libretro-db) Backport C89 fixes
This commit is contained in:
parent
0e5b18a619
commit
6cc98e1fa9
@ -81,8 +81,8 @@ int libretrodb_create(int fd, libretrodb_value_provider value_provider,
|
||||
off_t root;
|
||||
libretrodb_metadata_t md;
|
||||
uint64_t item_count = 0;
|
||||
struct rmsgpack_dom_value item = {};
|
||||
libretrodb_header_t header = {};
|
||||
struct rmsgpack_dom_value item = {0};
|
||||
libretrodb_header_t header = {0};
|
||||
|
||||
memcpy(header.magic_number, MAGIC_NUMBER, sizeof(MAGIC_NUMBER)-1);
|
||||
root = lseek(fd, 0, SEEK_CUR);
|
||||
|
@ -17,7 +17,7 @@
|
||||
#undef MAX_ARGS
|
||||
#define MAX_ARGS 50
|
||||
|
||||
static char tmp_error_buff [MAX_ERROR_LEN] = {};
|
||||
static char tmp_error_buff [MAX_ERROR_LEN] = {0};
|
||||
|
||||
struct buffer
|
||||
{
|
||||
|
@ -3,41 +3,18 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct rmsgpack_read_callbacks {
|
||||
int (* read_nil)(void *);
|
||||
int (* read_bool)(
|
||||
int,
|
||||
void *
|
||||
);
|
||||
int (* read_int)(
|
||||
int64_t,
|
||||
void *
|
||||
);
|
||||
int (* read_uint)(
|
||||
uint64_t,
|
||||
void *
|
||||
);
|
||||
int (* read_string)(
|
||||
char *,
|
||||
uint32_t,
|
||||
void *
|
||||
);
|
||||
int (* read_bin)(
|
||||
void *,
|
||||
uint32_t,
|
||||
void *
|
||||
);
|
||||
int (* read_map_start)(
|
||||
uint32_t,
|
||||
void *
|
||||
);
|
||||
int (* read_array_start)(
|
||||
uint32_t,
|
||||
void *
|
||||
);
|
||||
struct rmsgpack_read_callbacks
|
||||
{
|
||||
int (* read_nil) (void *);
|
||||
int (* read_bool)(int, void *);
|
||||
int (* read_int) (int64_t, void *);
|
||||
int (* read_uint)(uint64_t, void *);
|
||||
int (* read_string)(char *, uint32_t, void *);
|
||||
int (* read_bin)(void *, uint32_t, void *);
|
||||
int (* read_map_start) (uint32_t, void *);
|
||||
int (* read_array_start)(uint32_t, void *);
|
||||
};
|
||||
|
||||
|
||||
int rmsgpack_write_array_header(
|
||||
int fd,
|
||||
uint32_t size
|
||||
|
@ -196,7 +196,7 @@ void rmsgpack_dom_value_free(struct rmsgpack_dom_value *v)
|
||||
case RDT_INT:
|
||||
case RDT_BOOL:
|
||||
case RDT_UINT:
|
||||
// Do nothing
|
||||
/* Do nothing */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum rmsgpack_dom_type {
|
||||
enum rmsgpack_dom_type
|
||||
{
|
||||
RDT_NULL = 0,
|
||||
RDT_BOOL,
|
||||
RDT_UINT,
|
||||
@ -49,7 +50,8 @@ struct rmsgpack_dom_value
|
||||
} val;
|
||||
};
|
||||
|
||||
struct rmsgpack_dom_pair {
|
||||
struct rmsgpack_dom_pair
|
||||
{
|
||||
struct rmsgpack_dom_value key;
|
||||
struct rmsgpack_dom_value value;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user