From b5fef3db36186993d711878b5ae687138747c732 Mon Sep 17 00:00:00 2001 From: Klaus Ethgen Date: Thu, 14 Apr 2016 14:25:44 +0100 Subject: [PATCH] Work around GCC6 This problem is really annoying. Left shifting a value does not require it to be positive in C. However, some specifications define that as undefined behaviour. Nevertheless, as used in this case it is perfectly fine and widely used construct. Closes #230, #378 --- src/typedefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typedefs.h b/src/typedefs.h index ca34ef6c..7223ea70 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -161,7 +161,7 @@ typedef enum { CHANGE_WARN_CHANGED_EXT = 1 << 3, CHANGE_WARN_UNSAVED_META = 1 << 4, CHANGE_WARN_NO_WRITE_PERM_DEST_DIR = 1 << 5, - CHANGE_ERROR_MASK = (~0) << 8, /* the values below are fatal errors */ + CHANGE_ERROR_MASK = (~0U) << 8, /* the values below are fatal errors */ CHANGE_NO_READ_PERM = 1 << 8, CHANGE_NO_WRITE_PERM_DIR = 1 << 9, CHANGE_NO_DEST_DIR = 1 << 10, -- 2.20.1