Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
574671ba
Unverified
Commit
574671ba
authored
Feb 18, 2018
by
Edward Thomson
Committed by
GitHub
Feb 18, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4534 from pks-t/pks/build-warnings
Fix build warnings
parents
b8cb7536
92324d84
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
17 deletions
+18
-17
CMakeLists.txt
+1
-1
src/index.c
+1
-1
src/patch_parse.c
+1
-0
src/revparse.c
+1
-4
src/streams/openssl.c
+3
-3
src/tree.c
+1
-1
src/util.c
+4
-5
src/util.h
+6
-2
No files found.
CMakeLists.txt
View file @
574671ba
...
...
@@ -218,7 +218,7 @@ ELSE ()
ENABLE_WARNINGS
(
documentation
)
DISABLE_WARNINGS
(
missing-field-initializers
)
ENABLE_WARNINGS
(
strict-aliasing
=2
)
ENABLE_WARNINGS
(
strict-aliasing
)
ENABLE_WARNINGS
(
strict-prototypes
)
ENABLE_WARNINGS
(
declaration-after-statement
)
DISABLE_WARNINGS
(
unused-const-variable
)
...
...
src/index.c
View file @
574671ba
...
...
@@ -2494,7 +2494,7 @@ static int parse_index(git_index *index, const char *buffer, size_t buffer_size)
/* Parse all the entries */
for
(
i
=
0
;
i
<
header
.
entry_count
&&
buffer_size
>
INDEX_FOOTER_SIZE
;
++
i
)
{
git_index_entry
*
entry
;
git_index_entry
*
entry
=
NULL
;
size_t
entry_size
=
read_entry
(
&
entry
,
index
,
buffer
,
buffer_size
,
last
);
/* 0 bytes read means an object corruption */
...
...
src/patch_parse.c
View file @
574671ba
...
...
@@ -575,6 +575,7 @@ static int parse_hunk_body(
switch
(
c
)
{
case
'\n'
:
prefix
=
0
;
/* fall through */
case
' '
:
origin
=
GIT_DIFF_LINE_CONTEXT
;
...
...
src/revparse.c
View file @
574671ba
...
...
@@ -770,7 +770,6 @@ int revparse__ext(
}
case
'@'
:
{
if
(
spec
[
pos
+
1
]
==
'{'
)
{
git_object
*
temp_object
=
NULL
;
...
...
@@ -786,10 +785,8 @@ int revparse__ext(
if
(
temp_object
!=
NULL
)
base_rev
=
temp_object
;
break
;
}
else
{
/* Fall through */
}
}
/* fall through */
default:
if
((
error
=
ensure_left_hand_identifier_is_not_known_yet
(
base_rev
,
reference
))
<
0
)
...
...
src/streams/openssl.c
View file @
574671ba
...
...
@@ -344,7 +344,7 @@ static int verify_server_cert(SSL *ssl, const char *host)
GENERAL_NAMES
*
alts
;
struct
in6_addr
addr6
;
struct
in_addr
addr4
;
void
*
addr
;
void
*
addr
=
NULL
;
int
i
=
-
1
,
j
,
error
=
0
;
if
(
SSL_get_verify_result
(
ssl
)
!=
X509_V_OK
)
{
...
...
@@ -357,7 +357,7 @@ static int verify_server_cert(SSL *ssl, const char *host)
type
=
GEN_IPADD
;
addr
=
&
addr4
;
}
else
{
if
(
p_inet_pton
(
AF_INET6
,
host
,
&
addr6
))
{
if
(
p_inet_pton
(
AF_INET6
,
host
,
&
addr6
))
{
type
=
GEN_IPADD
;
addr
=
&
addr6
;
}
...
...
@@ -397,7 +397,7 @@ static int verify_server_cert(SSL *ssl, const char *host)
matched
=
1
;
}
else
if
(
type
==
GEN_IPADD
)
{
/* Here name isn't so much a name but a binary representation of the IP */
matched
=
!!
memcmp
(
name
,
addr
,
namelen
);
matched
=
addr
&&
!!
memcmp
(
name
,
addr
,
namelen
);
}
}
}
...
...
src/tree.c
View file @
574671ba
...
...
@@ -957,7 +957,7 @@ int git_tree_entry_bypath(
* walking down the path */
if
(
path
[
filename_len
+
1
]
!=
'\0'
)
break
;
/* fall through */
case
'\0'
:
/* If there are no more components in the path, return
* this entry */
...
...
src/util.c
View file @
574671ba
...
...
@@ -7,10 +7,7 @@
#include "util.h"
#include "git2.h"
#include <stdio.h>
#include <ctype.h>
#include "posix.h"
#include "common.h"
#ifdef GIT_WIN32
# include "win32/w32_buffer.h"
...
...
@@ -478,9 +475,11 @@ uint32_t git__hash(const void *key, int len, uint32_t seed)
switch
(
len
&
3
)
{
case
3
:
k1
^=
tail
[
2
]
<<
16
;
/* fall through */
case
2
:
k1
^=
tail
[
1
]
<<
8
;
/* fall through */
case
1
:
k1
^=
tail
[
0
];
MURMUR_BLOCK
();
MURMUR_BLOCK
();
}
h1
^=
len
;
...
...
src/util.h
View file @
574671ba
...
...
@@ -9,12 +9,16 @@
#include "common.h"
#ifndef GIT_WIN32
# include <ctype.h>
#endif
#include "git2/buffer.h"
#include "buffer.h"
#include "thread-utils.h"
#include "buffer.h"
#include "common.h"
#include "strnlen.h"
#include "thread-utils.h"
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment