Commit 6a261149 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

icc make lock_tree with -Werror. addresses #1185

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6406 c7de825b-a66e-492c-adef-691d508d4ae1
parent d0474952
......@@ -14,6 +14,7 @@ VISIBILITY = -fvisibility=hidden
CFLAGS = -Wall -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
ifeq ($(CC),icc)
CFLAGS += -g
CFLAGS += -Werror
CFLAGS += -diag-disable 177
CFLAGS += -diag-disable 589
CFLAGS += -diag-disable 981
......
......@@ -513,4 +513,8 @@ void toku_lt_add_ref(toku_lock_tree* tree);
int toku_lt_remove_ref(toku_lock_tree* tree);
int toku__lt_point_cmp(const toku_point* x, const toku_point* y);
toku_range_tree* toku__lt_ifexist_selfread(toku_lock_tree* tree, TXNID txn);
#endif
......@@ -16,9 +16,13 @@ ifeq ($(GCOV),GCOV)
else
GCOV_FLAGS =
endif
ifeq ($(CC),icc)
CFLAGS = -Wall $(OPTFLAGS) $(GCOV_FLAGS)
else
CFLAGS = -W -Wall -Wextra $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
endif
CPPFLAGS += -L../ -L../../range_tree
CPPFLAGS += -I. -I../ -I../../range_tree -I../../../newbrt -I../../../include
LDFLAGS = -lpthread -lz
......
......@@ -99,7 +99,7 @@ DBT *dbt_init(DBT *dbt, void *data, u_int32_t size) {
Parameters are of type toku_point.
Return values conform to cmp from qsort(3).
*/
extern int toku__lt_point_cmp(void* a, void* b);
// extern int toku__lt_point_cmp(void* a, void* b);
void init_point(toku_point* point, toku_lock_tree* tree) {
assert(point && tree);
......
......@@ -12,7 +12,7 @@ int main() {
toku_malloc, toku_free, toku_realloc);
CKERR(r);
for (duplicates = 0; duplicates < 2; duplicates++) {
for (duplicates = FALSE; duplicates < TRUE; duplicates++) {
r = toku_lt_create(&lt, duplicates, dbpanic, mgr,
get_compare_fun_from_db, get_dup_compare_from_db,
toku_malloc, toku_free, toku_realloc);
......
......@@ -27,7 +27,7 @@ static void do_range_test(int (*acquire)(toku_lock_tree*, DB*, TXNID,
DBT* data_r;
DBT* reverse_data_l;
DBT* reverse_data_r;
for (duplicates = 0; duplicates < 2; duplicates++) {
for (duplicates = FALSE; duplicates < TRUE; duplicates++) {
if (duplicates) {
data_l = &_data_l;
data_r = &_data_r;
......@@ -134,7 +134,7 @@ static void do_point_test(int (*acquire)(toku_lock_tree*, DB*, TXNID,
/* Point read tests. */
key = &_key;
for (duplicates = 0; duplicates < 2; duplicates++) {
for (duplicates = FALSE; duplicates < TRUE; duplicates++) {
if (duplicates) {
data = &_data;
reverse_data = NULL;
......@@ -242,7 +242,7 @@ int main(int argc, const char *argv[]) {
assert(get_max == max_locks);
/* create tests. */
for (duplicates = 0; duplicates < 2; duplicates++) {
for (duplicates = FALSE; duplicates < TRUE; duplicates++) {
r = toku_lt_create(NULL, duplicates, dbpanic, ltm,
get_compare_fun_from_db, get_dup_compare_from_db,
toku_malloc, toku_free, toku_realloc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment