Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
45e9956d
Commit
45e9956d
authored
Mar 21, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: fix warnings with -Wcast-qual using ccan/cast.
parent
1313203b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
ccan/tdb2/_info
ccan/tdb2/_info
+1
-0
ccan/tdb2/io.c
ccan/tdb2/io.c
+1
-1
ccan/tdb2/open.c
ccan/tdb2/open.c
+2
-2
ccan/tdb2/private.h
ccan/tdb2/private.h
+2
-1
No files found.
ccan/tdb2/_info
View file @
45e9956d
...
...
@@ -86,6 +86,7 @@ int main(int argc, char *argv[])
printf("ccan/failtest\n");
printf("ccan/tally\n");
printf("ccan/typesafe_cb\n");
printf("ccan/cast\n");
return 0;
}
...
...
ccan/tdb2/io.c
View file @
45e9956d
...
...
@@ -439,7 +439,7 @@ static enum TDB_ERROR tdb_expand_file(struct tdb_context *tdb,
const
void
*
tdb_access_read
(
struct
tdb_context
*
tdb
,
tdb_off_t
off
,
tdb_len_t
len
,
bool
convert
)
{
const
void
*
ret
=
NULL
;
void
*
ret
=
NULL
;
if
(
likely
(
!
(
tdb
->
flags
&
TDB_CONVERT
)))
{
ret
=
tdb
->
methods
->
direct
(
tdb
,
off
,
len
,
false
);
...
...
ccan/tdb2/open.c
View file @
45e9956d
...
...
@@ -454,7 +454,7 @@ fail_errno:
#ifdef TDB_TRACE
close
(
tdb
->
tracefd
);
#endif
free
(
(
char
*
)
tdb
->
name
);
free
(
cast_const
(
char
*
,
tdb
->
name
)
);
if
(
tdb
->
file
)
{
tdb_unlock_all
(
tdb
);
if
(
--
tdb
->
file
->
refcnt
==
0
)
{
...
...
@@ -495,7 +495,7 @@ int tdb_close(struct tdb_context *tdb)
else
tdb_munmap
(
tdb
->
file
);
}
free
(
(
char
*
)
tdb
->
name
);
free
(
cast_const
(
char
*
,
tdb
->
name
)
);
if
(
tdb
->
file
)
{
struct
tdb_file
**
i
;
...
...
ccan/tdb2/private.h
View file @
45e9956d
...
...
@@ -35,6 +35,7 @@
#include <ccan/tdb2/tdb2.h>
#include <ccan/likely/likely.h>
#include <ccan/compiler/compiler.h>
#include <ccan/cast/cast.h>
#if HAVE_BYTESWAP_H
#include <byteswap.h>
#endif
...
...
@@ -75,7 +76,7 @@ typedef uint64_t tdb_off_t;
/* Packing errors into pointers and v.v. */
#define TDB_PTR_IS_ERR(ptr) \
unlikely((
void *)(ptr) >= (void *)(
long)TDB_ERR_LAST)
unlikely((
unsigned long)(ptr) >= (unsigned
long)TDB_ERR_LAST)
#define TDB_PTR_ERR(p) ((enum TDB_ERROR)(long)(p))
#define TDB_ERR_PTR(err) ((void *)(long)(err))
...
...
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