From 3948fb1198bb7aefea995da09940432378965af9 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 4 May 2011 11:28:57 +0200 Subject: [PATCH] Fix empty parameter list in functions declarations Use foo(void) instead of foo() for parameterless functions declaration. This allows compiler to check if foo is called without parameters. --- audio/control.c | 4 ++-- audio/telephony-ofono.c | 2 +- health/hdp.c | 8 ++++---- health/hdp.h | 2 +- src/sdp-xml.c | 2 +- src/sdp-xml.h | 2 +- src/sdpd-service.c | 2 +- src/sdpd.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/audio/control.c b/audio/control.c index 95c0406b0..d6890de8b 100644 --- a/audio/control.c +++ b/audio/control.c @@ -200,7 +200,7 @@ static GSList *avctp_callbacks = NULL; static void auth_cb(DBusError *derr, void *user_data); -static sdp_record_t *avrcp_ct_record() +static sdp_record_t *avrcp_ct_record(void) { sdp_list_t *svclass_id, *pfseq, *apseq, *root; uuid_t root_uuid, l2cap, avctp, avrct; @@ -264,7 +264,7 @@ static sdp_record_t *avrcp_ct_record() return record; } -static sdp_record_t *avrcp_tg_record() +static sdp_record_t *avrcp_tg_record(void) { sdp_list_t *svclass_id, *pfseq, *apseq, *root; uuid_t root_uuid, l2cap, avctp, avrtg; diff --git a/audio/telephony-ofono.c b/audio/telephony-ofono.c index 6f5685b65..c00637efa 100644 --- a/audio/telephony-ofono.c +++ b/audio/telephony-ofono.c @@ -259,7 +259,7 @@ static int release_call(struct voice_call *vc) NULL, NULL, DBUS_TYPE_INVALID); } -static int release_answer_calls() +static int release_answer_calls(void) { DBG(""); return send_method_call(OFONO_BUS_NAME, modem_obj_path, diff --git a/health/hdp.c b/health/hdp.c index d53ea80cb..0f8d6fa22 100644 --- a/health/hdp.c +++ b/health/hdp.c @@ -260,7 +260,7 @@ static gint cmp_chan_mdl(gconstpointer a, gconstpointer mdl) return -1; } -static uint8_t get_app_id() +static uint8_t get_app_id(void) { uint8_t id = next_app_id; @@ -1288,7 +1288,7 @@ static void mcl_uncached(struct mcap_mcl *mcl, gpointer data) DBG("Mcl uncached %s", path); } -static void check_devices_mcl() +static void check_devices_mcl(void) { struct hdp_device *dev; GSList *l, *to_delete = NULL; @@ -1471,7 +1471,7 @@ static void destroy_create_dc_data(gpointer data) hdp_create_data_unref(dc_data); } -static void *generate_echo_packet() +static void *generate_echo_packet(void) { uint8_t *buf; int i; @@ -2193,7 +2193,7 @@ int hdp_manager_start(DBusConnection *conn) return 0; } -void hdp_manager_stop() +void hdp_manager_stop(void) { g_dbus_unregister_interface(connection, MANAGER_PATH, HEALTH_MANAGER); diff --git a/health/hdp.h b/health/hdp.h index 3cf87ca02..642ed5347 100644 --- a/health/hdp.h +++ b/health/hdp.h @@ -30,6 +30,6 @@ int hdp_device_register(DBusConnection *conn, struct btd_device *device); void hdp_device_unregister(struct btd_device *device); int hdp_manager_start(DBusConnection *conn); -void hdp_manager_stop(); +void hdp_manager_stop(void); gboolean hdp_set_mcl_cb(struct hdp_device *device, GError **err); diff --git a/src/sdp-xml.c b/src/sdp-xml.c index 3aa9df04b..f82137634 100644 --- a/src/sdp-xml.c +++ b/src/sdp-xml.c @@ -704,7 +704,7 @@ sdp_data_t *sdp_xml_parse_nil(const char *data) #define DEFAULT_XML_DATA_SIZE 1024 -struct sdp_xml_data *sdp_xml_data_alloc() +struct sdp_xml_data *sdp_xml_data_alloc(void) { struct sdp_xml_data *elem; diff --git a/src/sdp-xml.h b/src/sdp-xml.h index 703127696..db7db3010 100644 --- a/src/sdp-xml.h +++ b/src/sdp-xml.h @@ -49,7 +49,7 @@ struct sdp_xml_data { /* TODO: What is it used for? */ }; -struct sdp_xml_data *sdp_xml_data_alloc(); +struct sdp_xml_data *sdp_xml_data_alloc(void); void sdp_xml_data_free(struct sdp_xml_data *elem); struct sdp_xml_data *sdp_xml_data_expand(struct sdp_xml_data *elem); diff --git a/src/sdpd-service.c b/src/sdpd-service.c index fe4de6a29..96799edba 100644 --- a/src/sdpd-service.c +++ b/src/sdpd-service.c @@ -65,7 +65,7 @@ static const int sdpServerVnumEntries = 1; * seconds. Used for updating the service db state * attribute of the service record of the SDP server */ -uint32_t sdp_get_time() +uint32_t sdp_get_time(void) { /* * To handle failure in gettimeofday, so an old diff --git a/src/sdpd.h b/src/sdpd.h index dc7a2560c..471e9ccd2 100644 --- a/src/sdpd.h +++ b/src/sdpd.h @@ -83,7 +83,7 @@ sdp_list_t *sdp_get_access_list(void); int sdp_check_access(uint32_t handle, bdaddr_t *device); uint32_t sdp_next_handle(void); -uint32_t sdp_get_time(); +uint32_t sdp_get_time(void); #define SDP_SERVER_COMPAT (1 << 0) #define SDP_SERVER_MASTER (1 << 1) -- 2.47.3