mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
[Build] Reduce amount of warnings (#1944)
* one unused parameter in recursivebrowser.c * overlength strings are overly pedantic, modern compilers support large strings * __FUNCTION__ creeped back in after #288
This commit is contained in:
parent
3a5f95d69e
commit
f539a08222
5 changed files with 9 additions and 8 deletions
|
@ -74,7 +74,7 @@ AM_PROG_AR
|
||||||
dnl ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
dnl Base CFLAGS
|
dnl Base CFLAGS
|
||||||
dnl ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wunreachable-code"
|
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wno-overlength-strings -Wunreachable-code"
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
dnl Enable source code coverage reporting for GCC
|
dnl Enable source code coverage reporting for GCC
|
||||||
|
|
|
@ -22,6 +22,7 @@ flags = [
|
||||||
'-Winline',
|
'-Winline',
|
||||||
'-Wunreachable-code',
|
'-Wunreachable-code',
|
||||||
'-Werror=missing-prototypes',
|
'-Werror=missing-prototypes',
|
||||||
|
'-Wno-overlength-strings',
|
||||||
'-Wno-inline' # A bit too noisy with Bison…
|
'-Wno-inline' # A bit too noisy with Bison…
|
||||||
]
|
]
|
||||||
foreach f : flags
|
foreach f : flags
|
||||||
|
|
|
@ -335,7 +335,7 @@ static unsigned int recursive_browser_mode_get_num_entries(const Mode *sw) {
|
||||||
return pd->array_length;
|
return pd->array_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ModeMode recursive_browser_mode_result(Mode *sw, int mretv, char **input,
|
static ModeMode recursive_browser_mode_result(Mode *sw, int mretv, G_GNUC_UNUSED char **input,
|
||||||
unsigned int selected_line) {
|
unsigned int selected_line) {
|
||||||
ModeMode retv = MODE_EXIT;
|
ModeMode retv = MODE_EXIT;
|
||||||
FileBrowserModePrivateData *pd =
|
FileBrowserModePrivateData *pd =
|
||||||
|
|
|
@ -361,7 +361,7 @@ static void rofi_icon_fetcher_worker(thread_state *sdata,
|
||||||
icon_path, sentry->wsize, sentry->hsize, TRUE, &error);
|
icon_path, sentry->wsize, sentry->hsize, TRUE, &error);
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
g_warning("Failed to load image: |%s| %d %d %s (%p)", icon_path,
|
g_warning("Failed to load image: |%s| %d %d %s (%p)", icon_path,
|
||||||
sentry->wsize, sentry->hsize, error->message, pb);
|
sentry->wsize, sentry->hsize, error->message, (void*)pb);
|
||||||
g_error_free(error);
|
g_error_free(error);
|
||||||
if (pb) {
|
if (pb) {
|
||||||
g_object_unref(pb);
|
g_object_unref(pb);
|
||||||
|
|
10
source/xcb.c
10
source/xcb.c
|
@ -775,7 +775,7 @@ static int monitor_get_dimension(int monitor_id, workarea *mon) {
|
||||||
// find the dimensions of the monitor displaying point x,y
|
// find the dimensions of the monitor displaying point x,y
|
||||||
static void monitor_dimensions(int x, int y, workarea *mon) {
|
static void monitor_dimensions(int x, int y, workarea *mon) {
|
||||||
if (mon == NULL) {
|
if (mon == NULL) {
|
||||||
g_error("%s: mon == NULL", __FUNCTION__);
|
g_error("%s: mon == NULL", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(mon, 0, sizeof(workarea));
|
memset(mon, 0, sizeof(workarea));
|
||||||
|
@ -818,7 +818,7 @@ static int pointer_get(xcb_window_t root, int *x, int *y) {
|
||||||
|
|
||||||
static int monitor_active_from_winid(xcb_drawable_t id, workarea *mon) {
|
static int monitor_active_from_winid(xcb_drawable_t id, workarea *mon) {
|
||||||
if (mon == NULL) {
|
if (mon == NULL) {
|
||||||
g_error("%s: mon == NULL", __FUNCTION__);
|
g_error("%s: mon == NULL", __func__);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
xcb_window_t root = xcb->screen->root;
|
xcb_window_t root = xcb->screen->root;
|
||||||
|
@ -851,7 +851,7 @@ static int monitor_active_from_id_focused(int mon_id, workarea *mon) {
|
||||||
xcb_window_t active_window;
|
xcb_window_t active_window;
|
||||||
xcb_get_property_cookie_t awc;
|
xcb_get_property_cookie_t awc;
|
||||||
if (mon == NULL) {
|
if (mon == NULL) {
|
||||||
g_error("%s: mon == NULL", __FUNCTION__);
|
g_error("%s: mon == NULL", __func__);
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
awc = xcb_ewmh_get_active_window(&xcb->ewmh, xcb->screen_nbr);
|
awc = xcb_ewmh_get_active_window(&xcb->ewmh, xcb->screen_nbr);
|
||||||
|
@ -920,7 +920,7 @@ static int monitor_active_from_id(int mon_id, workarea *mon) {
|
||||||
xcb_window_t root = xcb->screen->root;
|
xcb_window_t root = xcb->screen->root;
|
||||||
int x, y;
|
int x, y;
|
||||||
if (mon == NULL) {
|
if (mon == NULL) {
|
||||||
g_error("%s: mon == NULL", __FUNCTION__);
|
g_error("%s: mon == NULL", __func__);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
g_debug("Monitor id: %d", mon_id);
|
g_debug("Monitor id: %d", mon_id);
|
||||||
|
@ -1000,7 +1000,7 @@ workarea mon_cache = {
|
||||||
};
|
};
|
||||||
int monitor_active(workarea *mon) {
|
int monitor_active(workarea *mon) {
|
||||||
if (mon == NULL) {
|
if (mon == NULL) {
|
||||||
g_error("%s: mon == NULL", __FUNCTION__);
|
g_error("%s: mon == NULL", __func__);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
g_debug("Monitor active");
|
g_debug("Monitor active");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue