From: Uwe Hermann Date: Wed, 16 May 2018 21:20:40 +0000 (+0200) Subject: libsigrok.h: Fix multiple compiler warnings (-Wshift-overflow=2). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3601d50e2643f4e871ef03c2f507f43a436ea81c;p=libsigrok.git libsigrok.h: Fix multiple compiler warnings (-Wshift-overflow=2). ../include/libsigrok/libsigrok.h:653:19: warning: result of β€˜1 << 31’ requires 33 bits to represent, but β€˜int’ only has 32 bits [-Wshift-overflow=] SR_CONF_GET = (1 << 31), ^~ [...] --- diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index cfc515d8..e88360b6 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -650,11 +650,11 @@ struct sr_key_info { /** Configuration capabilities. */ enum sr_configcap { /** Value can be read. */ - SR_CONF_GET = (1 << 31), + SR_CONF_GET = (1UL << 31), /** Value can be written. */ - SR_CONF_SET = (1 << 30), + SR_CONF_SET = (1UL << 30), /** Possible values can be enumerated. */ - SR_CONF_LIST = (1 << 29), + SR_CONF_LIST = (1UL << 29), }; /** Configuration keys */