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
3f3f6225
Commit
3f3f6225
authored
Sep 08, 2011
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #391 from sschuberth/development
Warning fixes
parents
564f0f7b
bac47f1f
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
25 deletions
+30
-25
git.git-authors
+1
-0
include/git2/blob.h
+1
-1
src/blob.c
+1
-1
src/config_file.c
+9
-6
src/filebuf.c
+5
-5
src/indexer.c
+3
-2
src/mwindow.c
+1
-1
src/odb_loose.c
+5
-5
src/pack.c
+1
-1
src/util.c
+2
-2
src/util.h
+1
-1
No files found.
git.git-authors
View file @
3f3f6225
...
...
@@ -61,6 +61,7 @@ ok Pierre Habouzit <madcoder@debian.org>
ok Pieter de Bie <pdebie@ai.rug.nl>
ok René Scharfe <rene.scharfe@lsrfire.ath.cx>
ign Robert Shearman <rob@codeweavers.com> (imap-send)
ok Sebastian Schuberth <sschuberth@gmail.com>
ok Shawn O. Pearce <spearce@spearce.org>
ok Steffen Prohaska <prohaska@zib.de>
ok Sven Verdoolaege <skimo@kotnet.org>
include/git2/blob.h
View file @
3f3f6225
...
...
@@ -106,7 +106,7 @@ GIT_EXTERN(const void *) git_blob_rawcontent(git_blob *blob);
* @param blob pointer to the blob
* @return size on bytes
*/
GIT_EXTERN
(
in
t
)
git_blob_rawsize
(
git_blob
*
blob
);
GIT_EXTERN
(
size_
t
)
git_blob_rawsize
(
git_blob
*
blob
);
/**
* Read a file from the working folder of a repository
...
...
src/blob.c
View file @
3f3f6225
...
...
@@ -36,7 +36,7 @@ const void *git_blob_rawcontent(git_blob *blob)
return
blob
->
odb_object
->
raw
.
data
;
}
in
t
git_blob_rawsize
(
git_blob
*
blob
)
size_
t
git_blob_rawsize
(
git_blob
*
blob
)
{
assert
(
blob
);
return
blob
->
odb_object
->
raw
.
len
;
...
...
src/config_file.c
View file @
3f3f6225
...
...
@@ -135,7 +135,7 @@ static int cvar_match_section(const char *local, const char *input)
{
char
*
first_dot
;
char
*
local_sp
=
strchr
(
local
,
' '
);
in
t
comparison_len
;
size_
t
comparison_len
;
/*
* If the local section name doesn't contain a space, then we can
...
...
@@ -198,7 +198,8 @@ static int cvar_normalize_name(cvar_t *var, char **output)
{
char
*
section_sp
=
strchr
(
var
->
section
,
' '
);
char
*
quote
,
*
name
;
int
len
,
ret
;
size_t
len
;
int
ret
;
/*
* The final string is going to be at most one char longer than
...
...
@@ -245,7 +246,7 @@ static int cvar_normalize_name(cvar_t *var, char **output)
static
char
*
interiorize_section
(
const
char
*
orig
)
{
char
*
dot
,
*
last_dot
,
*
section
,
*
ret
;
in
t
len
;
size_
t
len
;
dot
=
strchr
(
orig
,
'.'
);
last_dot
=
strrchr
(
orig
,
'.'
);
...
...
@@ -530,7 +531,7 @@ static char *cfg_readline(diskfile_backend *cfg)
{
char
*
line
=
NULL
;
char
*
line_src
,
*
line_end
;
in
t
line_len
;
size_
t
line_len
;
line_src
=
cfg
->
reader
.
read_ptr
;
...
...
@@ -600,7 +601,8 @@ GIT_INLINE(int) config_keychar(int c)
static
int
parse_section_header_ext
(
const
char
*
line
,
const
char
*
base_name
,
char
**
section_name
)
{
int
buf_len
,
total_len
,
pos
,
rpos
;
size_t
buf_len
,
total_len
;
int
pos
,
rpos
;
int
c
,
ret
;
char
*
subsection
,
*
first_quote
,
*
last_quote
;
int
error
=
GIT_SUCCESS
;
...
...
@@ -1100,7 +1102,8 @@ static int is_multiline_var(const char *str)
static
int
parse_multiline_variable
(
diskfile_backend
*
cfg
,
const
char
*
first
,
char
**
out
)
{
char
*
line
=
NULL
,
*
end
;
int
error
=
GIT_SUCCESS
,
len
,
ret
;
int
error
=
GIT_SUCCESS
,
ret
;
size_t
len
;
char
*
buf
;
/* Check that the next line exists */
...
...
src/filebuf.c
View file @
3f3f6225
...
...
@@ -116,19 +116,19 @@ static int write_deflate(git_filebuf *file, void *source, size_t len)
z_stream
*
zs
=
&
file
->
zs
;
if
(
len
>
0
||
file
->
flush_mode
==
Z_FINISH
)
{
zs
->
next_in
=
(
void
*
)
source
;
zs
->
avail_in
=
len
;
zs
->
next_in
=
source
;
zs
->
avail_in
=
(
uInt
)
len
;
do
{
in
t
have
;
size_
t
have
;
zs
->
next_out
=
file
->
z_buf
;
zs
->
avail_out
=
file
->
buf_size
;
zs
->
avail_out
=
(
uInt
)
file
->
buf_size
;
result
=
deflate
(
zs
,
file
->
flush_mode
);
assert
(
result
!=
Z_STREAM_ERROR
);
have
=
file
->
buf_size
-
zs
->
avail_out
;
have
=
file
->
buf_size
-
(
size_t
)
zs
->
avail_out
;
if
(
p_write
(
file
->
fd
,
file
->
z_buf
,
have
)
<
GIT_SUCCESS
)
return
git__throw
(
GIT_EOSERR
,
"Failed to write to file"
);
...
...
src/indexer.c
View file @
3f3f6225
...
...
@@ -99,7 +99,7 @@ static int cache_cmp(const void *a, const void *b)
int
git_indexer_new
(
git_indexer
**
out
,
const
char
*
packname
)
{
git_indexer
*
idx
;
unsigned
in
t
namelen
;
size_
t
namelen
;
int
ret
,
error
;
assert
(
out
&&
packname
);
...
...
@@ -186,7 +186,8 @@ static void index_path(char *path, git_indexer *idx)
int
git_indexer_write
(
git_indexer
*
idx
)
{
git_mwindow
*
w
=
NULL
;
int
error
,
namelen
;
int
error
;
size_t
namelen
;
unsigned
int
i
,
long_offsets
=
0
,
left
;
struct
git_pack_idx_header
hdr
;
char
filename
[
GIT_PATH_MAX
];
...
...
src/mwindow.c
View file @
3f3f6225
...
...
@@ -35,7 +35,7 @@
: 32 * 1024 * 1024)
#define DEFAULT_MAPPED_LIMIT \
((1024
L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256
))
((1024
* 1024) * (sizeof(void*) >= 8 ? 8192ULL : 256UL
))
/*
* We need this because each process is only allowed a specific amount
...
...
src/odb_loose.c
View file @
3f3f6225
...
...
@@ -183,19 +183,19 @@ static void init_stream(z_stream *s, void *out, size_t len)
{
memset
(
s
,
0
,
sizeof
(
*
s
));
s
->
next_out
=
out
;
s
->
avail_out
=
len
;
s
->
avail_out
=
(
uInt
)
len
;
}
static
void
set_stream_input
(
z_stream
*
s
,
void
*
in
,
size_t
len
)
{
s
->
next_in
=
in
;
s
->
avail_in
=
len
;
s
->
avail_in
=
(
uInt
)
len
;
}
static
void
set_stream_output
(
z_stream
*
s
,
void
*
out
,
size_t
len
)
{
s
->
next_out
=
out
;
s
->
avail_out
=
len
;
s
->
avail_out
=
(
uInt
)
len
;
}
...
...
@@ -243,10 +243,10 @@ static int inflate_buffer(void *in, size_t inlen, void *out, size_t outlen)
memset
(
&
zs
,
0x0
,
sizeof
(
zs
));
zs
.
next_out
=
out
;
zs
.
avail_out
=
outlen
;
zs
.
avail_out
=
(
uInt
)
outlen
;
zs
.
next_in
=
in
;
zs
.
avail_in
=
inlen
;
zs
.
avail_in
=
(
uInt
)
inlen
;
if
(
inflateInit
(
&
zs
)
<
Z_OK
)
return
git__throw
(
GIT_ERROR
,
"Failed to inflate buffer"
);
...
...
src/pack.c
View file @
3f3f6225
...
...
@@ -404,7 +404,7 @@ int packfile_unpack_compressed(
memset
(
&
stream
,
0
,
sizeof
(
stream
));
stream
.
next_out
=
buffer
;
stream
.
avail_out
=
size
+
1
;
stream
.
avail_out
=
(
uInt
)
size
+
1
;
st
=
inflateInit
(
&
stream
);
if
(
st
!=
Z_OK
)
{
...
...
src/util.c
View file @
3f3f6225
...
...
@@ -118,9 +118,9 @@ Return:
return
GIT_SUCCESS
;
}
void
git__strntolower
(
char
*
str
,
in
t
len
)
void
git__strntolower
(
char
*
str
,
size_
t
len
)
{
in
t
i
;
size_
t
i
;
for
(
i
=
0
;
i
<
len
;
++
i
)
{
str
[
i
]
=
(
char
)
tolower
(
str
[
i
]);
...
...
src/util.h
View file @
3f3f6225
...
...
@@ -90,7 +90,7 @@ GIT_INLINE(int) git__is_sizet(git_off_t p)
extern
char
*
git__strtok
(
char
**
end
,
const
char
*
sep
);
extern
void
git__strntolower
(
char
*
str
,
in
t
len
);
extern
void
git__strntolower
(
char
*
str
,
size_
t
len
);
extern
void
git__strtolower
(
char
*
str
);
extern
int
git__fnmatch
(
const
char
*
pattern
,
const
char
*
name
,
int
flags
);
...
...
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