summaryrefslogtreecommitdiff
path: root/src/fcint.h
diff options
context:
space:
mode:
authorTom Anderson <thomasanderson@chromium.org>2018-04-11 11:39:56 -0700
committerBehdad Esfahbod <behdad@behdad.org>2018-04-16 15:23:20 +0200
commitc60ed9ef66e59584f8b54323018e9e6c69925c7e (patch)
tree51f5e68cbaa99a056bdff8d7c922d30d30843ca6 /src/fcint.h
parenta8a6efa805fc03e790214e8a0bc55843a258d774 (diff)
downloadfontconfig-c60ed9ef66e59584f8b54323018e9e6c69925c7e.tar.gz
Fix undefined-shift UBSAN errors
The expression "1 << 31" will cause UBSAN to complain with this error message: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' The same operation on unsigned types is fine, however. This CL replaces the strings "1 <<" with "1U <<".
Diffstat (limited to 'src/fcint.h')
-rw-r--r--src/fcint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fcint.h b/src/fcint.h
index 5de311f..d837a38 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -242,7 +242,7 @@ typedef enum _FcOp {
} FcOp;
typedef enum _FcOpFlags {
- FcOpFlagIgnoreBlanks = 1 << 0
+ FcOpFlagIgnoreBlanks = 1U << 0
} FcOpFlags;
#define FC_OP_GET_OP(_x_) ((_x_) & 0xffff)