summaryrefslogtreecommitdiff
path: root/src/oid.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-11-03 18:00:49 -0800
committerShawn O. Pearce <spearce@spearce.org>2008-11-03 18:42:54 -0800
commitb3a2f90e54bcb32a88d13539e5672993c5037638 (patch)
tree7033f9ee0e52b08cb5679cd49b7b7999eaf9eaf8 /src/oid.c
parent8722a77ec384aa0bc87b8f8f6c1c7ab6aeffae83 (diff)
downloadlibgit2-b3a2f90e54bcb32a88d13539e5672993c5037638.tar.gz
Enable warnings by default and fix warning in oid.c
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/oid.c')
-rw-r--r--src/oid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/oid.c b/src/oid.c
index 39c222290..72b9511ad 100644
--- a/src/oid.c
+++ b/src/oid.c
@@ -49,7 +49,8 @@ int git_oid_mkstr(git_oid *out, const char *str)
{
int p;
for (p = 0; p < sizeof(out->id); p++, str += 2) {
- int v = (from_hex[str[0]] << 4) | from_hex[str[1]];
+ int v = (from_hex[(unsigned char)str[0]] << 4)
+ | from_hex[(unsigned char)str[1]];
if (v < 0)
return GIT_ENOTOID;
out->id[p] = (unsigned char)v;