summaryrefslogtreecommitdiff
path: root/pcre_internal.h
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-19 16:14:27 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-19 16:14:27 +0000
commit8dfd59522601de2d8b4af55e3eece985c383920d (patch)
tree1c6b358608790d5036d38f1cbef2592cb47b6fde /pcre_internal.h
parentba51b0eb436f3b79734194e7640f4075cdb302a8 (diff)
downloadpcre-8dfd59522601de2d8b4af55e3eece985c383920d.tar.gz
Get rid of compiler warnings from pcre_compile.c in all modes.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1143 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_internal.h')
-rw-r--r--pcre_internal.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/pcre_internal.h b/pcre_internal.h
index 853e84f..e7e7d2d 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -523,9 +523,13 @@ capturing parenthesis numbers in back references. */
#define PUT2(a,n,d) \
a[n] = (d) >> 8; \
a[(n)+1] = (d) & 255
+
+/* For reasons that I do not understand, the expression in this GET2 macro is
+treated by gcc as a signed expression, even when a is declared as unsigned. It
+seems that any kind of arithmetic results in a signed value. */
#define GET2(a,n) \
- (((a)[n] << 8) | (a)[(n)+1])
+ (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
#elif defined COMPILE_PCRE16
@@ -2394,7 +2398,7 @@ typedef struct compile_data {
int names_found; /* Number of entries so far */
int name_entry_size; /* Size of each entry */
int workspace_size; /* Size of workspace */
- int bracount; /* Count of capturing parens as we compile */
+ unsigned int bracount; /* Count of capturing parens as we compile */
int final_bracount; /* Saved value after first pass */
int max_lookbehind; /* Maximum lookbehind (characters) */
int top_backref; /* Maximum back reference */