Skip to content

Commit

Permalink
Fix some compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDavenport committed Feb 25, 2024
1 parent 058aac8 commit 2bbaa36
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions source/modes/drun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ static void get_apps(DRunModePrivateData *pd) {
g_free(cache_file);
}

static void drun_mode_parse_entry_fields() {
static void drun_mode_parse_entry_fields(void) {
char *savept = NULL;
// Make a copy, as strtok will modify it.
char *switcher_str = g_strdup(config.drun_match_fields);
Expand Down Expand Up @@ -1118,7 +1118,7 @@ static void drun_mode_parse_entry_fields() {
g_free(switcher_str);
}

static void drun_mode_parse_display_format() {
static void drun_mode_parse_display_format(void) {
for (int i = 0; i < DRUN_MATCH_NUM_FIELDS; i++) {
if (matching_entry_fields[i].enabled_display)
continue;
Expand Down
6 changes: 0 additions & 6 deletions source/theme.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#define G_LOG_DOMAIN "Theme"

#include "config.h"
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -599,11 +598,6 @@ void rofi_theme_print(ThemeWidget *widget) {
}
}

/**
* Main lex parser.
*/
int yyparse();

/**
* Destroy the internal of lex parser.
*/
Expand Down
6 changes: 3 additions & 3 deletions source/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static int lev_sort(const void *p1, const void *p2, void *arg) {
/**
* Stores a screenshot of Rofi at that point in time.
*/
void rofi_capture_screenshot() {
void rofi_capture_screenshot(void) {
RofiViewState *state = current_active_menu;
if (state == NULL || state->main_window == NULL) {
g_warning("Nothing to screenshot.");
Expand Down Expand Up @@ -1597,7 +1597,7 @@ void rofi_view_finalize(RofiViewState *state) {
* This function should be called when the input of the entry is changed.
* TODO: Evaluate if this needs to be a 'signal' on textbox?
*/
static void rofi_view_input_changed() {
static void rofi_view_input_changed(void) {
rofi_view_take_action("inputchange");

RofiViewState *state = current_active_menu;
Expand Down Expand Up @@ -2591,7 +2591,7 @@ void rofi_view_hide(void) {
}
}

void rofi_view_cleanup() {
void rofi_view_cleanup(void) {
// Clear clipboard data.
xcb_stuff_set_clipboard(NULL);
g_debug("Cleanup.");
Expand Down
4 changes: 2 additions & 2 deletions source/xcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static int x11_is_extension_present(const char *extension) {
return present;
}

static void x11_build_monitor_layout_xinerama() {
static void x11_build_monitor_layout_xinerama(void) {
xcb_xinerama_query_screens_cookie_t screens_cookie =
xcb_xinerama_query_screens_unchecked(xcb->connection);

Expand Down Expand Up @@ -589,7 +589,7 @@ static void x11_build_monitor_layout_xinerama() {
free(screens_reply);
}

static void x11_build_monitor_layout() {
static void x11_build_monitor_layout(void) {
if (xcb->monitors) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/textbox-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ gboolean config_parse_set_property(G_GNUC_UNUSED const Property *p,

void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {}
void rofi_add_warning_message(G_GNUC_UNUSED GString *msg) {}
void rofi_view_queue_redraw() {}
void rofi_view_queue_redraw(void) {}
void rofi_view_get_current_monitor(G_GNUC_UNUSED int *width,
G_GNUC_UNUSED int *height) {}
int rofi_view_error_dialog(const char *msg, G_GNUC_UNUSED int markup) {
Expand Down

0 comments on commit 2bbaa36

Please sign in to comment.