Skip to content

Commit

Permalink
Fix Clang warning for C prototypes with void
Browse files Browse the repository at this point in the history
  • Loading branch information
Valérian Sibille committed Oct 23, 2024
1 parent d450cad commit 99646ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dr_meter/src/dr_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void zero_dr_stats(dr_stats_t* dr_stats)
dr_stats->rms = 0.;
}

dr_stats_t make_zero_dr_stats()
dr_stats_t make_zero_dr_stats(void)
{
dr_stats_t dr_stats;
zero_dr_stats(&dr_stats);
Expand Down
2 changes: 1 addition & 1 deletion dr_meter/src/sample_mean.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "sample_mean.h"

sample_mean_t make_sample_mean()
sample_mean_t make_sample_mean(void)
{
sample_mean_t sample_mean;
reset_sample_mean(&sample_mean);
Expand Down
6 changes: 3 additions & 3 deletions dr_plugin/src/dr_meter_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void datum_work(tagged_dr_datum_t* datum)
compute_single_dr((DB_playItem_t*)datum->item, &datum->dr_stats);
}

static int get_number_of_threads()
static int get_number_of_threads(void)
{
int number_of_threads = ddb_api->conf_get_int("dr_meter.threads", 0);
if(number_of_threads <= 0) number_of_threads = 1;//against negative user value
Expand Down Expand Up @@ -254,12 +254,12 @@ unsigned sprint_dr_log_impl(const tagged_dr_data_t* tagged_dr_data, char* buffer
return sprint_log_dr_log_printer(&log_printer, tagged_dr_data, buffer);
}

int dr_meter_start()
int dr_meter_start(void)
{
return 0;
}

int dr_meter_stop()
int dr_meter_stop(void)
{
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion dr_plugin_gui/src/dr_display_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static unsigned get_header_footer_size(unsigned selected_items)
return (header_length + footer_length) * number_of_albums;
}

static unsigned item_length()
static unsigned item_length(void)
{
return 40 + 5 + 5 + 1 + 3 + 80 + 2;//DR info, space, duration, space, track number, title, newline
}
Expand Down
6 changes: 3 additions & 3 deletions dr_plugin_gui/src/dr_meter_plugin_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DB_functions_t* ddb_api;
dr_meter_plugin_t* dr_meter_plugin;
ddb_gtkui_t* gtk_ui_plugin;

int dr_meter_gui_start()
int dr_meter_gui_start(void)
{
return 0;
}
Expand Down Expand Up @@ -61,7 +61,7 @@ static void retrieve_current_selection(selection_t* selection)
ddb_api->pl_unlock();
}

static GdkWindowTypeHint get_window_hint()
static GdkWindowTypeHint get_window_hint(void)
{
int focus_dialogue = ddb_api->conf_get_int("dr_meter_gui.focus_dialogue", 0);
return focus_dialogue ? GDK_WINDOW_TYPE_HINT_DIALOG : GDK_WINDOW_TYPE_HINT_UTILITY;
Expand Down Expand Up @@ -121,7 +121,7 @@ DB_plugin_action_t* dr_meter_gui_get_actions(DB_playItem_t* unused)
return &dr_meter_action;
}

int dr_meter_gui_connect()
int dr_meter_gui_connect(void)
{
gtk_ui_plugin =(ddb_gtkui_t*)ddb_api->plug_get_for_id(DDB_GTKUI_PLUGIN_ID);
dr_meter_plugin = (dr_meter_plugin_t*)ddb_api->plug_get_for_id ("dr_meter");
Expand Down

0 comments on commit 99646ef

Please sign in to comment.