diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-04-12 14:40:27 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2019-04-12 14:40:27 +0000 |
commit | 7e3dd80809ec0f6b16df60e17effcfd4fc445aeb (patch) | |
tree | 5a11d8e78c6b025705ce9ff7bdf53fa9b38057b3 /src/pcre2_compile.c | |
parent | 706a1c624c591e404a7739b49fd33830427ff2af (diff) | |
download | pcre2-7e3dd80809ec0f6b16df60e17effcfd4fc445aeb.tar.gz |
Change a number of expressions like 1<<10 to 1u<<10.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1083 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_compile.c')
-rw-r--r-- | src/pcre2_compile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 90d30a5..30db6d5 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -368,17 +368,17 @@ enum { PSKIP_ALT, PSKIP_CLASS, PSKIP_KET }; experimenting to figure out how to stop gcc 5.3.0 from warning with -Wconversion. This version gets a warning: - #define SETBIT(a,b) a[(b)/8] |= (uint8_t)(1 << ((b)&7)) + #define SETBIT(a,b) a[(b)/8] |= (uint8_t)(1u << ((b)&7)) Let's hope the apparently less efficient version isn't actually so bad if the compiler is clever with identical subexpressions. */ -#define SETBIT(a,b) a[(b)/8] = (uint8_t)(a[(b)/8] | (1 << ((b)&7))) +#define SETBIT(a,b) a[(b)/8] = (uint8_t)(a[(b)/8] | (1u << ((b)&7))) /* Private flags added to firstcu and reqcu. */ -#define REQ_CASELESS (1 << 0) /* Indicates caselessness */ -#define REQ_VARY (1 << 1) /* reqcu followed non-literal item */ +#define REQ_CASELESS (1u << 0) /* Indicates caselessness */ +#define REQ_VARY (1u << 1) /* reqcu followed non-literal item */ /* Negative values for the firstcu and reqcu flags */ #define REQ_UNSET (-2) /* Not yet found anything */ #define REQ_NONE (-1) /* Found not fixed char */ |