summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQball Cow <qball@blame.services>2024-02-25 23:33:22 +0100
committerQball Cow <qball@blame.services>2024-02-25 23:33:22 +0100
commit2bbaa36b7a8055206559be9ecf894747680f810c (patch)
tree4ecab48c9d475eed7819eeee5153d02a52df13a8
parent058aac887f1d2c9877901aede2e43f2092b108f2 (diff)
Fix some compiler warnings.
-rw-r--r--source/modes/drun.c4
-rw-r--r--source/theme.c6
-rw-r--r--source/view.c6
-rw-r--r--source/xcb.c4
-rw-r--r--test/textbox-test.c2
5 files changed, 8 insertions, 14 deletions
diff --git a/source/modes/drun.c b/source/modes/drun.c
index 444b87da..c18d8f95 100644
--- a/source/modes/drun.c
+++ b/source/modes/drun.c
@@ -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);
@@ -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;
diff --git a/source/theme.c b/source/theme.c
index fe70574c..7084fe84 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -29,7 +29,6 @@
#define G_LOG_DOMAIN "Theme"
#include "config.h"
-#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -600,11 +599,6 @@ void rofi_theme_print(ThemeWidget *widget) {
}
/**
- * Main lex parser.
- */
-int yyparse();
-
-/**
* Destroy the internal of lex parser.
*/
void yylex_destroy(void);
diff --git a/source/view.c b/source/view.c
index 37231d7a..81787a1d 100644
--- a/source/view.c
+++ b/source/view.c
@@ -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.");
@@ -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;
@@ -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.");
diff --git a/source/xcb.c b/source/xcb.c
index db8da2ea..ccdec05a 100644
--- a/source/xcb.c
+++ b/source/xcb.c
@@ -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);
@@ -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;
}
diff --git a/test/textbox-test.c b/test/textbox-test.c
index 3c7d6798..8ae3c9b6 100644
--- a/test/textbox-test.c
+++ b/test/textbox-test.c
@@ -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) {