Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
97f4c9ad
Commit
97f4c9ad
authored
Feb 01, 2008
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed all warnings.
git-svn-id:
file:///svn/tokudb@2020
c7de825b-a66e-492c-adef-691d508d4ae1
parent
f42468b2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
28 additions
and
20 deletions
+28
-20
src/range_tree/Makefile
src/range_tree/Makefile
+2
-5
src/range_tree/tests/Makefile
src/range_tree/tests/Makefile
+3
-1
src/range_tree/tests/test_00040_find.c
src/range_tree/tests/test_00040_find.c
+1
-1
src/range_tree/tests/test_00042_find_limited.c
src/range_tree/tests/test_00042_find_limited.c
+3
-1
src/range_tree/tests/test_00045_find_overlaps.c
src/range_tree/tests/test_00045_find_overlaps.c
+2
-0
src/range_tree/tests/test_00047_find_memory.c
src/range_tree/tests/test_00047_find_memory.c
+9
-5
src/range_tree/tests/test_00050_predecessorsuccessor.c
src/range_tree/tests/test_00050_predecessorsuccessor.c
+8
-7
No files found.
src/range_tree/Makefile
View file @
97f4c9ad
...
...
@@ -16,12 +16,9 @@ else
GCOV_FLAGS
=
endif
CFLAGS
=
-W
-Wall
-Werror
-fPIC
$(OPTFLAGS)
$(GCOV_FLAGS)
CFLAGS
=
-W
-Wall
-We
xtra
-We
rror
-fPIC
$(OPTFLAGS)
$(GCOV_FLAGS)
CFLAGS
+=
-Wbad-function-cast
-Wcast-align
-Wconversion
-Waggregate-return
CFLAGS
+=
-Wmissing-noreturn
-Wmissing-format-attribute
ifneq
($(W),)
CFLAGS
+=
-Wunreachable-code
endif
CFLAGS
+=
-Wmissing-noreturn
-Wmissing-format-attribute
-Wunreachable-code
CPPFLAGS
=
-I
../../include
-I
../../newbrt
CPPFLAGS
+=
-D_GNU_SOURCE
-D_THREAD_SAFE
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE64_SOURCE
...
...
src/range_tree/tests/Makefile
View file @
97f4c9ad
...
...
@@ -22,7 +22,9 @@ endif
LIBNAME
=
librt.
$(LIBEXT)
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CFLAGS
=
-Wall
-Werror
$(OPTFLAGS)
-g3
-ggdb3
$(GCOV_FLAGS)
CFLAGS
=
-Wall
-Wextra
-Werror
$(OPTFLAGS)
-g3
-ggdb3
$(GCOV_FLAGS)
CFLAGS
+=
-Wbad-function-cast
-Wcast-align
-Wconversion
-Waggregate-return
CFLAGS
+=
-Wmissing-noreturn
-Wmissing-format-attribute
-Wunreachable-code
CPPFLAGS
+=
-L
../
-I
../
-I
../../../newbrt
-I
../../../include
-lpthread
...
...
src/range_tree/tests/test_00040_find.c
View file @
97f4c9ad
...
...
@@ -22,7 +22,7 @@ int main(int argc, const char *argv[]) {
unsigned
found
;
toku_range
*
buf
=
(
toku_range
*
)
toku_malloc
(
2
*
sizeof
(
toku_range
));
unsigned
bufsize
=
2
;
int
i
;
unsigned
i
;
parse_args
(
argc
,
argv
);
...
...
src/range_tree/tests/test_00042_find_limited.c
View file @
97f4c9ad
...
...
@@ -154,7 +154,9 @@ void tests(BOOL allow_overlaps) {
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
i
;
parse_args
(
argc
,
argv
);
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
i
++
)
nums
[
i
]
=
i
;
buflen
=
2
;
buf
=
(
toku_range
*
)
toku_malloc
(
2
*
sizeof
(
toku_range
));
...
...
src/range_tree/tests/test_00045_find_overlaps.c
View file @
97f4c9ad
...
...
@@ -154,6 +154,8 @@ void tests(BOOL allow_overlaps) {
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
parse_args
(
argc
,
argv
);
buflen
=
2
;
buf
=
(
toku_range
*
)
toku_malloc
(
2
*
sizeof
(
toku_range
));
tests
(
FALSE
);
...
...
src/range_tree/tests/test_00047_find_memory.c
View file @
97f4c9ad
...
...
@@ -13,14 +13,15 @@ void verify_all_overlap(toku_range* query, toku_range* list, unsigned listlen) {
}
int
nums
[
64
<<
3
];
const
in
t
numlen
=
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
const
size_
t
numlen
=
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
char
letters
[
2
]
=
{
'A'
,
'B'
};
toku_range_tree
*
tree
;
toku_range
*
buf
;
unsigned
buflen
;
toku_range
*
init_range
(
toku_range
*
range
,
int
left
,
int
right
,
int
data
)
{
toku_range
*
init_range
(
toku_range
*
range
,
unsigned
left
,
unsigned
right
,
int
data
)
{
range
->
left
=
&
nums
[
left
];
range
->
right
=
&
nums
[
right
];
if
(
data
<
0
)
range
->
data
=
NULL
;
...
...
@@ -28,14 +29,15 @@ toku_range* init_range(toku_range* range, int left, int right, int data) {
return
range
;
}
void
setup_tree
(
BOOL
allow_overlaps
,
BOOL
insert
,
int
left
,
int
right
,
int
data
)
{
void
setup_tree
(
BOOL
allow_overlaps
,
BOOL
insert
,
unsigned
left
,
unsigned
right
,
unsigned
data
)
{
int
r
;
toku_range
range
;
r
=
toku_rt_create
(
&
tree
,
int_cmp
,
char_cmp
,
allow_overlaps
,
malloc
,
free
,
realloc
);
CKERR
(
r
);
if
(
insert
)
{
r
=
toku_rt_insert
(
tree
,
init_range
(
&
range
,
left
,
right
,
data
));
r
=
toku_rt_insert
(
tree
,
init_range
(
&
range
,
left
,
right
,
(
int
)
data
));
CKERR
(
r
);
}
}
...
...
@@ -100,7 +102,9 @@ void tests(BOOL allow_overlaps) {
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
i
;
parse_args
(
argc
,
argv
);
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
i
++
)
nums
[
i
]
=
i
;
buflen
=
2
;
buf
=
(
toku_range
*
)
toku_malloc
(
2
*
sizeof
(
toku_range
));
...
...
src/range_tree/tests/test_00050_predecessorsuccessor.c
View file @
97f4c9ad
...
...
@@ -25,8 +25,7 @@ toku_range* init_range(toku_range* range, int left, int right, int data) {
return
range
;
}
void
*
init_point
(
int
left
)
{
assert
(
left
>=
0
);
void
*
init_point
(
unsigned
left
)
{
assert
(
left
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]));
return
(
&
nums
[
left
]);
}
...
...
@@ -77,13 +76,13 @@ void runlimitsearch(toku_range* query, unsigned limit, unsigned findexpect) {
typedef
enum
{
PRED
=
0
,
SUCC
=
1
}
predsucc
;
void
runtest
(
predsucc
testtype
,
void
*
query
,
BOOL
findexpect
,
int
left
,
int
right
,
int
data
)
{
unsigned
left
,
unsigned
right
,
unsigned
data
)
{
int
r
;
BOOL
found
;
toku_range
out
;
assert
(
data
>=
0
&&
data
<
sizeof
(
letters
)
/
sizeof
(
letters
[
0
]));
assert
(
left
>=
0
&&
left
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]));
assert
(
right
>=
0
&&
right
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]));
assert
(
data
<
sizeof
(
letters
)
/
sizeof
(
letters
[
0
]));
assert
(
left
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]));
assert
(
right
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]));
if
(
testtype
==
PRED
)
{
r
=
toku_rt_predecessor
(
tree
,
query
,
&
out
,
&
found
);
...
...
@@ -258,7 +257,9 @@ void tests(BOOL allow_overlaps) {
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
i
;
parse_args
(
argc
,
argv
);
unsigned
i
;
for
(
i
=
0
;
i
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
i
++
)
nums
[
i
]
=
i
;
buflen
=
2
;
...
...
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