From b7e08f9305ad24520603f54a58cfedb11da80d0f Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 7 Aug 2019 15:05:08 +0000 Subject: [PATCH] Make GCC happy about math in r350676. MFC after: 1 week --- sbin/camcontrol/modeedit.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c index f6648abb2c3..c35ad143e1d 100644 --- a/sbin/camcontrol/modeedit.c +++ b/sbin/camcontrol/modeedit.c @@ -295,11 +295,8 @@ editentry_set(char *name, char *newvalue, int editonly) /* * Macro to determine the maximum value of the given size for the current * resolution. - * XXX Lovely x86's optimize out the case of shifting by 32 and gcc doesn't - * currently workaround it (even for int64's), so we have to kludge it. */ -#define RESOLUTION_MAX(size) ((resolution * (size) == 32)? \ - UINT_MAX: (1 << (resolution * (size))) - 1) +#define RESOLUTION_MAX(size) ((1LL << (resolution * (size))) - 1) assert(newvalue != NULL); if (*newvalue == '\0')