Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Walton <bdwalton@gmail.com>2015-03-02 22:22:31 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-02 23:32:24 +0300
commit189c860c9ec5deb95845c056ca5c15b58970158e (patch)
tree95425f23f775ddfd60d1e96927aca0eabc6203b7 /kwset.c
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
kwset: use unsigned char to store values with high-bit set
Sun Studio on Solaris issues warnings about improper initialization values being used when defining tolower_trans_tbl[] in ctype.c. The array wants to store values with high-bit set and treat them as values between 128 to 255. Unlike the rest of the Git codebase where we explicitly specify 'unsigned char' for such variables and arrays, however, kwset code we borrowed from elsewhere uses 'char' for this and other variables. Fix the declarations to explicitly use 'unsigned char' where necessary to bring it in line with the rest of the Git. Signed-off-by: Ben Walton <bdwalton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'kwset.c')
-rw-r--r--kwset.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kwset.c b/kwset.c
index a0f49b3aca..e6236a0359 100644
--- a/kwset.c
+++ b/kwset.c
@@ -80,13 +80,13 @@ struct kwset
struct trie *next[NCHAR]; /* Table of children of the root. */
char *target; /* Target string if there's only one. */
int mind2; /* Used in Boyer-Moore search for one string. */
- char const *trans; /* Character translation table. */
+ unsigned char const *trans; /* Character translation table. */
};
/* Allocate and initialize a keyword set object, returning an opaque
pointer to it. Return NULL if memory is not available. */
kwset_t
-kwsalloc (char const *trans)
+kwsalloc (unsigned char const *trans)
{
struct kwset *kwset;
@@ -381,7 +381,7 @@ kwsprep (kwset_t kws)
register struct kwset *kwset;
register int i;
register struct trie *curr;
- register char const *trans;
+ register unsigned char const *trans;
unsigned char delta[NCHAR];
kwset = (struct kwset *) kws;
@@ -590,7 +590,7 @@ cwexec (kwset_t kws, char const *text, size_t len, struct kwsmatch *kwsmatch)
register int d;
register char const *end, *qlim;
register struct tree const *tree;
- register char const *trans;
+ register unsigned char const *trans;
accept = NULL;