ANSI decl
authorJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 24 Sep 2014 09:13:53 +0000 (11:13 +0200)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 24 Sep 2014 09:13:53 +0000 (11:13 +0200)
15 files changed:
src/lib/amd.c
src/lib/amd.h
src/lib/lmsensor.c
src/lib/lmsensor.h
src/lib/nvidia.c
src/lib/nvidia.h
src/lib/pgtop2.c
src/lib/plog.c
src/lib/plog.h
src/lib/slog.c
src/lib/slog.h
src/server/sysinfo.c
src/server/sysinfo.h
src/ui.c
src/ui_appindicator.c

index c2ec5eb..f760360 100644 (file)
@@ -156,7 +156,7 @@ static struct psensor *create_sensor(int id, int type, int values_len)
 
   Return 0 if no AMD/ATI GPUs or cannot get information.
 */
-static int init()
+static int init(void)
 {
        LPAdapterInfo lpadapterinfo;
        int i, inumberadapters, inumberadaptersactive, lpstatus, iadapterindex;
@@ -295,7 +295,7 @@ void amd_psensor_list_append(struct psensor ***sensors, int values_len)
                }
 }
 
-void amd_cleanup()
+void amd_cleanup(void)
 {
        if (hdll) {
                if (adl_main_control_done)
index d7dde40..2ab93eb 100644 (file)
@@ -26,6 +26,6 @@ void amd_psensor_list_update(struct psensor **sensors);
 
 void amd_psensor_list_append(struct psensor ***sensors, int values_max_length);
 
-void amd_cleanup();
+void amd_cleanup(void);
 
 #endif
index baa97ef..b28dcc7 100644 (file)
@@ -191,7 +191,7 @@ lmsensor_psensor_create(const sensors_chip_name *chip,
        return psensor;
 }
 
-void lmsensor_init()
+void lmsensor_init(void)
 {
        int err;
 
@@ -237,7 +237,7 @@ void lmsensor_psensor_list_append(struct psensor ***sensors, int vn)
        }
 }
 
-void lmsensor_cleanup()
+void lmsensor_cleanup(void)
 {
        if (init_done)
                sensors_cleanup();
index 341863d..c66ab76 100644 (file)
@@ -23,6 +23,6 @@ void lmsensor_psensor_list_update(struct psensor **sensors);
 
 void lmsensor_psensor_list_append(struct psensor ***sensors, int values_length);
 
-void lmsensor_cleanup();
+void lmsensor_cleanup(void);
 
 #endif
index 677ca06..5a8a203 100644 (file)
@@ -284,7 +284,7 @@ static struct psensor *create_nvidia_sensor(int id, int subtype, int value_len)
        return s;
 }
 
-static int init()
+static int init(void)
 {
        int evt, err;
 
@@ -373,7 +373,7 @@ void nvidia_psensor_list_append(struct psensor ***ss, int values_len)
        }
 }
 
-void nvidia_cleanup()
+void nvidia_cleanup(void)
 {
        if (display) {
                XCloseDisplay(display);
index a94d72e..3d80657 100644 (file)
@@ -25,6 +25,6 @@ void nvidia_psensor_list_update(struct psensor **sensors);
 
 void nvidia_psensor_list_append(struct psensor ***sensors, int values_length);
 
-void nvidia_cleanup();
+void nvidia_cleanup(void);
 
 #endif
index a25c705..cdd4492 100644 (file)
@@ -66,7 +66,7 @@ static struct psensor *create_mem_free_sensor(int measures_len)
                              measures_len);
 }
 
-static double get_usage()
+static double get_usage(void)
 {
        glibtop_cpu cpu;
        unsigned long int used, dt;
@@ -89,7 +89,7 @@ static double get_usage()
        return cpu_rate;
 }
 
-static double get_mem_free()
+static double get_mem_free(void)
 {
        glibtop_mem mem;
        double v;
index 48c6009..285ac03 100644 (file)
@@ -43,7 +43,7 @@ void log_open(const char *path)
                log_printf(LOG_ERR, _("Cannot open log file: %s"), path);
 }
 
-void log_close()
+void log_close(void)
 {
        if (!file)
                return;
index 29880e9..90796eb 100644 (file)
@@ -29,7 +29,7 @@ enum log_level {
 };
 
 void log_open(const char *path);
-void log_close();
+void log_close(void);
 
 void log_printf(int lvl, const char *fmt, ...);
 void log_debug(const char *fmt, ...);
index 5b16526..b22ba02 100644 (file)
@@ -179,7 +179,7 @@ static void *slog_routine(void *data)
        pthread_exit(0);
 }
 
-void slog_close()
+void slog_close(void)
 {
        if (file) {
                pthread_cancel(thread);
index ea2d6d1..4a39461 100644 (file)
@@ -24,6 +24,6 @@
 #include "psensor.h"
 
 bool slog_activate(const char *, struct psensor **, pthread_mutex_t *, int s);
-void slog_close();
+void slog_close(void);
 
 #endif
index a278a3a..a1ea1de 100644 (file)
@@ -67,7 +67,7 @@ void sysinfo_update(struct psysinfo *info)
                info->interfaces = glibtop_get_netlist(&buf);
 }
 
-void sysinfo_cleanup()
+void sysinfo_cleanup(void)
 {
        if (cpu)
                g_free(cpu);
index 3330eb7..1d0537a 100644 (file)
@@ -37,7 +37,7 @@ struct psysinfo {
 };
 
 void sysinfo_update(struct psysinfo *sysinfo);
-void sysinfo_cleanup();
+void sysinfo_cleanup(void);
 
 char *sysinfo_to_json_string(const struct psysinfo *sysinfo);
 
index dcb3ea0..ddf7fd4 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -76,7 +76,7 @@ on_delete_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
        return TRUE;
 }
 
-void ui_show_about_dialog()
+void ui_show_about_dialog(void)
 {
        static const char *const authors[] = { "jeanfi@gmail.com", NULL };
 
index bccdf9b..1aaabce 100644 (file)
@@ -282,12 +282,12 @@ void ui_appindicator_init(struct ui_psensor *ui)
        ui_appindicator_update_menu(ui);
 }
 
-int is_appindicator_supported()
+int is_appindicator_supported(void)
 {
        return appindicator_supported;
 }
 
-void ui_appindicator_cleanup()
+void ui_appindicator_cleanup(void)
 {
        free(sensors);
 }