Date: Wed, 7 Aug 2019 15:05:09 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350677 - head/sbin/camcontrol Message-ID: <201908071505.x77F591h022030@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Aug 7 15:05:08 2019 New Revision: 350677 URL: https://svnweb.freebsd.org/changeset/base/350677 Log: Make GCC happy about math in r350676. MFC after: 1 week Modified: head/sbin/camcontrol/modeedit.c Modified: head/sbin/camcontrol/modeedit.c ============================================================================== --- head/sbin/camcontrol/modeedit.c Wed Aug 7 14:45:10 2019 (r350676) +++ head/sbin/camcontrol/modeedit.c Wed Aug 7 15:05:08 2019 (r350677) @@ -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')
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908071505.x77F591h022030>