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
c8c9a469
Commit
c8c9a469
authored
Mar 17, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: clear bogus gcc uninitialized warnings with -O3
parent
e50b1a07
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
ccan/tdb2/test/run-11-simple-fetch.c
ccan/tdb2/test/run-11-simple-fetch.c
+1
-1
ccan/tdb2/test/run-12-store.c
ccan/tdb2/test/run-12-store.c
+1
-1
ccan/tdb2/test/run-25-hashoverload.c
ccan/tdb2/test/run-25-hashoverload.c
+1
-1
ccan/tdb2/transaction.c
ccan/tdb2/transaction.c
+3
-2
No files found.
ccan/tdb2/test/run-11-simple-fetch.c
View file @
c8c9a469
...
...
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
O_RDWR
|
O_CREAT
|
O_TRUNC
,
0600
,
&
tap_log_attr
);
ok1
(
tdb
);
if
(
tdb
)
{
struct
tdb_data
d
;
struct
tdb_data
d
=
{
NULL
,
0
};
/* Bogus GCC warning */
/* fetch should fail. */
failtest_suppress
=
false
;
...
...
ccan/tdb2/test/run-12-store.c
View file @
c8c9a469
...
...
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
/* We seemed to lose some keys.
* Insert and check they're in there! */
for
(
j
=
0
;
j
<
500
;
j
++
)
{
struct
tdb_data
d
;
struct
tdb_data
d
=
{
NULL
,
0
};
/* Bogus GCC warning */
ok1
(
tdb_store
(
tdb
,
key
,
data
,
TDB_REPLACE
)
==
0
);
ok1
(
tdb_fetch
(
tdb
,
key
,
&
d
)
==
TDB_SUCCESS
);
ok1
(
equal
(
d
,
data
));
...
...
ccan/tdb2/test/run-25-hashoverload.c
View file @
c8c9a469
...
...
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
plan_tests
(
6883
);
for
(
i
=
0
;
i
<
sizeof
(
flags
)
/
sizeof
(
flags
[
0
]);
i
++
)
{
struct
tdb_data
d
;
struct
tdb_data
d
=
{
NULL
,
0
};
/* Bogus GCC warning */
tdb
=
tdb_open
(
"run-25-hashoverload.tdb"
,
flags
[
i
],
O_RDWR
|
O_CREAT
|
O_TRUNC
,
0600
,
&
hattr
);
...
...
ccan/tdb2/transaction.c
View file @
c8c9a469
...
...
@@ -745,11 +745,12 @@ static void set_recovery_header(struct tdb_recovery_record *rec,
static
enum
TDB_ERROR
transaction_setup_recovery
(
struct
tdb_context
*
tdb
,
tdb_off_t
*
magic_offset
)
{
tdb_len_t
recovery_size
;
/* Initialized for GCC's 4.4.5 overzealous uninitialized warnings. */
tdb_len_t
recovery_size
=
0
;
tdb_off_t
recovery_offset
=
0
,
recovery_max_size
=
0
;
unsigned
char
*
data
,
*
p
;
const
struct
tdb_methods
*
methods
=
tdb
->
transaction
->
io_methods
;
struct
tdb_recovery_record
*
rec
;
tdb_off_t
recovery_offset
,
recovery_max_size
;
tdb_off_t
old_map_size
=
tdb
->
transaction
->
old_map_size
;
uint64_t
magic
,
tailer
;
int
i
;
...
...
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