Fix some compiler warnings.

This commit is contained in:
Qball Cow 2024-02-25 23:33:22 +01:00
parent 058aac887f
commit 2bbaa36b7a
5 changed files with 8 additions and 14 deletions

View File

@ -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;

View File

@ -29,7 +29,6 @@
#define G_LOG_DOMAIN "Theme"
#include "config.h"
#include <errno.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@ -599,11 +598,6 @@ void rofi_theme_print(ThemeWidget *widget) {
}
}
/**
* Main lex parser.
*/
int yyparse();
/**
* Destroy the internal of lex parser.
*/

View File

@ -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.");

View File

@ -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;
}

View File

@ -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) {