Correct a few warnings that show upo in Clang but not in GCC

This commit is contained in:
Mike Brady
2017-10-24 10:30:20 +01:00
parent 588c551bae
commit d406514966
4 changed files with 7 additions and 1 deletions
+1
View File
@@ -89,4 +89,5 @@ int start_dbus_service() {
g_bus_own_name(G_BUS_TYPE_SYSTEM, "org.gnome.ShairportSync", G_BUS_NAME_OWNER_FLAGS_NONE, NULL,
on_name_acquired, NULL, NULL, NULL);
// G_BUS_TYPE_SESSION or G_BUS_TYPE_SYSTEM
return 0; // this is just to quieten a compiler warning
}
+4 -1
View File
@@ -65,9 +65,10 @@ void *dbus_thread_func(void *arg) {
g_main_loop_run(loop);
// dbus_service_main(); // let it run inside a thread
return NULL; // this is just to quieten a compiler warning.
}
void main(void) {
int main(void) {
pthread_create(&dbus_thread, NULL, &dbus_thread_func, NULL);
@@ -116,4 +117,6 @@ void main(void) {
printf("exiting program.\n");
g_object_unref(proxy);
return 0;
}
+1
View File
@@ -2,6 +2,7 @@
#define _PLAYER_H
#include <arpa/inet.h>
#include <pthread.h>
#include "config.h"
+1
View File
@@ -969,6 +969,7 @@ pthread_t dbus_thread;
void *dbus_thread_func(void *arg) {
loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(loop);
return NULL;
}
#endif