mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 06:20:56 +00:00
Enable warnings by default and fix warning in oid.c
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
8722a77ec3
commit
b3a2f90e54
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ all::
|
|||||||
|
|
||||||
DOXYGEN = doxygen
|
DOXYGEN = doxygen
|
||||||
|
|
||||||
CFLAGS = -g -O2
|
CFLAGS = -g -O2 -Wall
|
||||||
OS = unix
|
OS = unix
|
||||||
|
|
||||||
BASIC_CFLAGS := -Iinclude
|
BASIC_CFLAGS := -Iinclude
|
||||||
|
@ -49,7 +49,8 @@ int git_oid_mkstr(git_oid *out, const char *str)
|
|||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
for (p = 0; p < sizeof(out->id); p++, str += 2) {
|
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)
|
if (v < 0)
|
||||||
return GIT_ENOTOID;
|
return GIT_ENOTOID;
|
||||||
out->id[p] = (unsigned char)v;
|
out->id[p] = (unsigned char)v;
|
||||||
|
Loading…
Reference in New Issue
Block a user