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
1a7bae4d
Commit
1a7bae4d
authored
Jan 11, 2010
by
Ramsay Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some "unused parameter" warnings with -Wextra
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
parent
e3fe32b6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
src/cc-compat.h
+10
-0
src/fileops.h
+2
-2
src/odb.c
+8
-0
tests/t0020-dirent.c
+1
-1
No files found.
src/cc-compat.h
View file @
1a7bae4d
...
...
@@ -30,6 +30,16 @@
# define GIT_TYPEOF(x)
#endif
#ifdef __cplusplus
# define GIT_UNUSED(x)
#else
# ifdef __GNUC__
# define GIT_UNUSED(x) x __attribute__ ((__unused__))
# else
# define GIT_UNUSED(x) x
# endif
#endif
/*
* Does our compiler/platform support the C99 <inttypes.h> and
* <stdint.h> header files. (C99 requires that <inttypes.h>
...
...
src/fileops.h
View file @
1a7bae4d
...
...
@@ -13,13 +13,13 @@
#include <time.h>
#ifdef GIT_WIN32
GIT_INLINE
(
int
)
link
(
const
char
*
old
,
const
char
*
new
)
GIT_INLINE
(
int
)
link
(
const
char
*
GIT_UNUSED
(
old
),
const
char
*
GIT_UNUSED
(
new
)
)
{
errno
=
ENOSYS
;
return
-
1
;
}
GIT_INLINE
(
int
)
git__mkdir
(
const
char
*
path
,
int
mode
)
GIT_INLINE
(
int
)
git__mkdir
(
const
char
*
path
,
int
GIT_UNUSED
(
mode
)
)
{
return
mkdir
(
path
);
}
...
...
src/odb.c
View file @
1a7bae4d
...
...
@@ -1110,6 +1110,8 @@ static int read_packed(git_obj *out, git_pack *p, const git_oid *id)
off_t
pos
;
int
res
;
assert
(
out
&&
p
&&
id
);
if
(
pack_openidx
(
p
))
return
GIT_ERROR
;
res
=
p
->
idx_search
(
&
pos
,
p
,
id
);
...
...
@@ -1128,6 +1130,12 @@ int git_odb__read_packed(git_obj *out, git_odb *db, const git_oid *id)
git_packlist
*
pl
=
packlist_get
(
db
);
size_t
j
;
assert
(
out
&&
db
&&
id
);
out
->
data
=
NULL
;
out
->
len
=
0
;
out
->
type
=
GIT_OBJ_BAD
;
if
(
!
pl
)
return
GIT_ENOTFOUND
;
...
...
tests/t0020-dirent.c
View file @
1a7bae4d
...
...
@@ -184,7 +184,7 @@ static walk_data empty = {
empty_names
};
static
int
dont_call_me
(
void
*
state
,
char
*
path
)
static
int
dont_call_me
(
void
*
GIT_UNUSED
(
state
),
char
*
GIT_UNUSED
(
path
)
)
{
test_die
(
"dont_call_me: unexpected callback!"
);
}
...
...
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