Sun C warns about an integer overflow for 1 << 31, presumably because 1

is signed; make the flags field in "struct magnify" unsigned, and make
the flags unsigned, so we shift 1U rather than 1.

svn path=/trunk/; revision=25421
This commit is contained in:
Guy Harris 2008-06-04 00:05:57 +00:00
parent caa183b45b
commit aeda5cffa7
1 changed files with 4 additions and 4 deletions

View File

@ -263,10 +263,10 @@ struct magnify {
int width, height;
struct zoom zoom;
struct graph *g;
#define MAGZOOMS_SAME (1 << 0)
#define MAGZOOMS_SAME_RATIO (1 << 1)
#define MAGZOOMS_IGNORE (1 << 31)
int flags;
#define MAGZOOMS_SAME (1U << 0)
#define MAGZOOMS_SAME_RATIO (1U << 1)
#define MAGZOOMS_IGNORE (1U << 31)
guint flags;
struct {
GtkSpinButton *h_zoom, *v_zoom;
} widget;