LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File feh-fix_pointer_arithmetics.patch of Package feh (Project X11:Utilities)

--- src/menu.c.orig	2012-04-05 19:14:08.260668430 +0200
+++ src/menu.c	2012-04-05 19:15:15.716666031 +0200
@@ -24,6 +24,8 @@
 
 */
 
+#include <stdint.h>
+
 #include "feh.h"
 #include "thumbnail.h"
 #include "wallpaper.h"
@@ -915,7 +917,8 @@
 
 void feh_menu_init_common()
 {
-	int num_desks, i;
+	int num_desks;
+    intptr_t i;
 	char buf[30];
 	feh_menu *m;
 
@@ -967,7 +970,7 @@
 		m = feh_menu_new();
 		m->name = estrdup("TILED");
 		for (i = 0; i < num_desks; i++) {
-			snprintf(buf, sizeof(buf), "Desktop %d", i + 1);
+			snprintf(buf, sizeof(buf), "Desktop %zu", i + 1);
 			if (opt.slideshow || opt.multiwindow)
 				feh_menu_add_entry(m, buf, NULL, CB_BG_TILED,
 						i, NULL);
@@ -979,7 +982,7 @@
 		m = feh_menu_new();
 		m->name = estrdup("SCALED");
 		for (i = 0; i < num_desks; i++) {
-			snprintf(buf, sizeof(buf), "Desktop %d", i + 1);
+			snprintf(buf, sizeof(buf), "Desktop %zu", i + 1);
 
 			if (opt.slideshow || opt.multiwindow)
 				feh_menu_add_entry(m, buf, NULL, CB_BG_SCALED,
@@ -992,7 +995,7 @@
 		m = feh_menu_new();
 		m->name = estrdup("CENTERED");
 		for (i = 0; i < num_desks; i++) {
-			snprintf(buf, sizeof(buf), "Desktop %d", i + 1);
+			snprintf(buf, sizeof(buf), "Desktop %zu", i + 1);
 			if (opt.slideshow || opt.multiwindow)
 				feh_menu_add_entry(m, buf, NULL,
 						CB_BG_CENTERED, i, NULL);
@@ -1004,7 +1007,7 @@
 		m = feh_menu_new();
 		m->name = estrdup("FILLED");
 		for (i = 0; i < num_desks; i++) {
-			snprintf(buf, sizeof(buf), "Desktop %d", i + 1);
+			snprintf(buf, sizeof(buf), "Desktop %zu", i + 1);
 			if (opt.slideshow || opt.multiwindow)
 				feh_menu_add_entry(m, buf, NULL,
 						CB_BG_FILLED,