Skip to content

Commit

Permalink
A few small fixes for strict compiler settings.
Browse files Browse the repository at this point in the history
Especially the fix in the header is important because it forces one to tone
down compile strictness if you want to include this header. Compiled with
gcc and added at least -Wextra -Werror -Wstrict-prototypes
-Wmissing-prototypes.
  • Loading branch information
marcelmeulemans committed Jul 26, 2017
1 parent 19c739f commit 51f2ad7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions json-builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define snprintf _snprintf
#endif

const static json_serialize_opts default_opts =
static const json_serialize_opts default_opts =
{
json_serialize_mode_single_line,
0,
Expand Down Expand Up @@ -99,7 +99,7 @@ const int f_spaces_after_commas = (1 << 1);
const int f_spaces_after_colons = (1 << 2);
const int f_tabs = (1 << 3);

int get_serialize_flags (json_serialize_opts opts)
static int get_serialize_flags (json_serialize_opts opts)
{
int flags = 0;

Expand Down Expand Up @@ -357,7 +357,7 @@ json_value * json_boolean_new (int b)
return value;
}

json_value * json_null_new ()
json_value * json_null_new (void)
{
json_value * value = (json_value *) calloc (1, sizeof (json_builder_value));

Expand Down
2 changes: 1 addition & 1 deletion json-builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ json_value * json_string_new_nocopy (unsigned int length, json_char *);
json_value * json_integer_new (json_int_t);
json_value * json_double_new (double);
json_value * json_boolean_new (int);
json_value * json_null_new ();
json_value * json_null_new (void);


/*** Serializing
Expand Down

0 comments on commit 51f2ad7

Please sign in to comment.