mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-07-13 21:34:02 +00:00
Merge pull request #63 from orbea/clang
Fix -Werror=strict-prototypes and -Werror=implicit-function-declaration
This commit is contained in:
commit
cb1ffb2676
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
|
||||||
|
GType test_object_get_type (void);
|
||||||
|
|
||||||
#define TEST_OBJECT_TYPE (test_object_get_type())
|
#define TEST_OBJECT_TYPE (test_object_get_type())
|
||||||
#define TEST_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_OBJECT_TYPE, TestObject))
|
#define TEST_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TEST_OBJECT_TYPE, TestObject))
|
||||||
#define IS_TEST_OBJCET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_OBJCET_TYPE))
|
#define IS_TEST_OBJCET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TEST_OBJCET_TYPE))
|
||||||
|
@ -36,7 +36,7 @@ static void clean_objlist(GList *list)
|
|||||||
|
|
||||||
|
|
||||||
SearpcClient *
|
SearpcClient *
|
||||||
searpc_client_new ()
|
searpc_client_new (void)
|
||||||
{
|
{
|
||||||
return g_new0 (SearpcClient, 1);
|
return g_new0 (SearpcClient, 1);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ struct _SearpcClient {
|
|||||||
typedef struct _SearpcClient LIBSEARPC_API SearpcClient;
|
typedef struct _SearpcClient LIBSEARPC_API SearpcClient;
|
||||||
|
|
||||||
LIBSEARPC_API
|
LIBSEARPC_API
|
||||||
SearpcClient *searpc_client_new ();
|
SearpcClient *searpc_client_new (void);
|
||||||
|
|
||||||
LIBSEARPC_API void
|
LIBSEARPC_API void
|
||||||
searpc_client_free (SearpcClient *client);
|
searpc_client_free (SearpcClient *client);
|
||||||
|
@ -139,7 +139,7 @@ def generate_marshal_register_item(ret_type, arg_types):
|
|||||||
signature_name=signature_name)
|
signature_name=signature_name)
|
||||||
|
|
||||||
def gen_marshal_register_function(f):
|
def gen_marshal_register_function(f):
|
||||||
write_file(f, "static void register_marshals()""")
|
write_file(f, "static void register_marshals(void)""")
|
||||||
write_file(f, "{")
|
write_file(f, "{")
|
||||||
for item in func_table:
|
for item in func_table:
|
||||||
write_file(f, generate_marshal_register_item(item[0], item[1]))
|
write_file(f, generate_marshal_register_item(item[0], item[1]))
|
||||||
@ -147,7 +147,7 @@ def gen_marshal_register_function(f):
|
|||||||
|
|
||||||
signature_template = r"""
|
signature_template = r"""
|
||||||
inline static gchar *
|
inline static gchar *
|
||||||
${signature_name}()
|
${signature_name}(void)
|
||||||
{
|
{
|
||||||
return searpc_compute_signature (${args});
|
return searpc_compute_signature (${args});
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ searpc_server_reopen_slow_log (const char *slow_log_path)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
searpc_server_final()
|
searpc_server_final(void)
|
||||||
{
|
{
|
||||||
g_hash_table_destroy (service_table);
|
g_hash_table_destroy (service_table);
|
||||||
g_hash_table_destroy (marshal_table);
|
g_hash_table_destroy (marshal_table);
|
||||||
|
@ -67,7 +67,7 @@ searpc_server_reopen_slow_log (const char *slow_log_path);
|
|||||||
* Free the server structure.
|
* Free the server structure.
|
||||||
*/
|
*/
|
||||||
LIBSEARPC_API
|
LIBSEARPC_API
|
||||||
void searpc_server_final ();
|
void searpc_server_final (void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* searpc_create_service:
|
* searpc_create_service:
|
||||||
|
@ -371,7 +371,7 @@ clar_test_init(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
clar_test_run()
|
clar_test_run(void)
|
||||||
{
|
{
|
||||||
if (_clar.argc > 1)
|
if (_clar.argc > 1)
|
||||||
clar_parse_args(_clar.argc, _clar.argv);
|
clar_parse_args(_clar.argc, _clar.argv);
|
||||||
@ -386,7 +386,7 @@ clar_test_run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
clar_test_shutdown()
|
clar_test_shutdown(void)
|
||||||
{
|
{
|
||||||
clar_print_shutdown(
|
clar_print_shutdown(
|
||||||
_clar.tests_ran,
|
_clar.tests_ran,
|
||||||
|
@ -204,7 +204,7 @@ get_substring (const gchar *orig_str, int sub_len, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static SearpcClient *
|
static SearpcClient *
|
||||||
do_create_client_with_pipe_transport()
|
do_create_client_with_pipe_transport(void)
|
||||||
{
|
{
|
||||||
SearpcNamedPipeClient *pipe_client = searpc_create_named_pipe_client(pipe_path);
|
SearpcNamedPipeClient *pipe_client = searpc_create_named_pipe_client(pipe_path);
|
||||||
cl_must_pass_(searpc_named_pipe_client_connect(pipe_client), "named pipe client failed to connect");
|
cl_must_pass_(searpc_named_pipe_client_connect(pipe_client), "named pipe client failed to connect");
|
||||||
|
Loading…
Reference in New Issue
Block a user