diff options
author | rbuj <[email protected]> | 2021-03-16 09:09:37 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-03-29 14:59:30 +0200 |
commit | 348151fd0204a4ae0aa76bc3312cf045d7a6a2dd (patch) | |
tree | ba01dfa09a34ea3727835cd5763937e1ce32df9f /src | |
parent | 0dee04e5b88d941bb727ffdc80d50966ca48d9f6 (diff) | |
download | marco-348151fd0204a4ae0aa76bc3312cf045d7a6a2dd.tar.bz2 marco-348151fd0204a4ae0aa76bc3312cf045d7a6a2dd.tar.xz |
warning: declaration of a variable shadows a previous local
Diffstat (limited to 'src')
-rw-r--r-- | src/core/display.c | 6 | ||||
-rw-r--r-- | src/ui/menu.c | 7 | ||||
-rw-r--r-- | src/wm-tester/test-gravity.c | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/core/display.c b/src/core/display.c index f79e60ea..3b52c8b4 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -403,8 +403,8 @@ meta_display_open (void) XInternAtoms (the_display->xdisplay, atom_names, G_N_ELEMENTS (atom_names), False, atoms); { - int i = 0; -#define item(x) the_display->atom_##x = atoms[i++]; + int idx = 0; +#define item(x) the_display->atom_##x = atoms[idx++]; #include "atomnames.h" #undef item } @@ -5240,7 +5240,6 @@ prefs_changed_callback (MetaPreference pref, if (pref == META_PREF_MOUSE_BUTTON_MODS || pref == META_PREF_FOCUS_MODE) { - MetaDisplay *display = data; GSList *windows; GSList *tmp; @@ -5290,7 +5289,6 @@ prefs_changed_callback (MetaPreference pref, } else if (pref == META_PREF_ATTACH_MODAL_DIALOGS) { - MetaDisplay *display = data; GSList *windows; GSList *tmp; diff --git a/src/ui/menu.c b/src/ui/menu.c index df40f1b6..34e4b5d9 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -351,9 +351,6 @@ meta_window_menu_new (MetaFrames *frames, if (ops & menuitem.op || menuitem.op == 0) { GtkWidget *mi; - MenuData *md; - unsigned int key; - MetaVirtualModifier mods; mi = menu_item_new (&menuitem, -1); @@ -455,6 +452,10 @@ meta_window_menu_new (MetaFrames *frames, } else if (menuitem.type != MENU_ITEM_SEPARATOR) { + MenuData *md; + unsigned int key; + MetaVirtualModifier mods; + meta_core_get_menu_accelerator (menuitems[i].op, -1, &key, &mods); diff --git a/src/wm-tester/test-gravity.c b/src/wm-tester/test-gravity.c index 4276549b..cb8512a0 100644 --- a/src/wm-tester/test-gravity.c +++ b/src/wm-tester/test-gravity.c @@ -66,7 +66,7 @@ window_gravity_to_string (int gravity) } static void -calculate_position (int i, int doubled, int *x, int *y) +calculate_position (int i, int is_doubled, int *x, int *y) { if (i == 9) { @@ -77,7 +77,7 @@ calculate_position (int i, int doubled, int *x, int *y) { int xoff = x_offset[i % 3]; int yoff = y_offset[i / 3]; - if (doubled) + if (is_doubled) { xoff *= 2; yoff *= 2; |