Merge lp:~brianaker/drizzle/icc-warnings into lp:~drizzle-trunk/drizzle/development

Proposed by Brian Aker
Status: Merged
Approved by: Brian Aker
Approved revision: 2484
Merged at revision: 2483
Proposed branch: lp:~brianaker/drizzle/icc-warnings
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 136 lines (+34/-20)
6 files modified
drizzled/drizzled.cc (+1/-1)
drizzled/join_table.cc (+27/-15)
drizzled/join_table.h (+2/-0)
drizzled/optimizer/access_method/system.cc (+1/-1)
drizzled/sql_select.cc (+2/-2)
drizzled/util/test.h (+1/-1)
To merge this branch: bzr merge lp:~brianaker/drizzle/icc-warnings
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+87313@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/drizzled.cc'
2--- drizzled/drizzled.cc 2011-11-22 14:53:10 +0000
3+++ drizzled/drizzled.cc 2012-01-03 02:27:26 +0000
4@@ -1441,7 +1441,7 @@
5
6 bool was_help_requested()
7 {
8- return vm.count("help");
9+ return bool(vm.count("help"));
10 }
11
12 void usage();
13
14=== modified file 'drizzled/join_table.cc'
15--- drizzled/join_table.cc 2011-06-22 22:23:29 +0000
16+++ drizzled/join_table.cc 2012-01-03 02:27:26 +0000
17@@ -40,7 +40,7 @@
18
19 if (this->type == AM_SYSTEM)
20 {
21- if ((error=this->joinReadSystem()))
22+ if ((error= this->joinReadSystem()))
23 { // Info for DESCRIBE
24 this->info="const row not found";
25 /* Mark for EXPLAIN that the row was not found */
26@@ -154,27 +154,39 @@
27 this->cache.pos=pos;
28 }
29
30-int JoinTable::joinReadSystem()
31+int join_read_system(JoinTable *tab)
32 {
33- Table *Table= this->table;
34+ Table *table= tab->table;
35 int error;
36- if (Table->status & STATUS_GARBAGE) // If first read
37+
38+ if (table->status & STATUS_GARBAGE) // If first read
39 {
40- if ((error=Table->cursor->read_first_row(table->getInsertRecord(),
41- Table->getShare()->getPrimaryKey())))
42+ if ((error= table->cursor->read_first_row(table->getInsertRecord(),
43+ table->getShare()->getPrimaryKey())))
44 {
45 if (error != HA_ERR_END_OF_FILE)
46- return Table->report_error(error);
47- this->table->mark_as_null_row();
48- Table->emptyRecord(); // Make empty record
49+ {
50+ return table->report_error(error);
51+ }
52+
53+ tab->table->mark_as_null_row();
54+ table->emptyRecord(); // Make empty record
55 return -1;
56 }
57- Table->storeRecord();
58- }
59- else if (!Table->status) // Only happens with left join
60- Table->restoreRecord(); // restore old record
61- Table->null_row=0;
62- return Table->status ? -1 : 0;
63+ table->storeRecord();
64+ }
65+ else if (table->status == 0) // Only happens with left join
66+ {
67+ table->restoreRecord(); // restore old record
68+ }
69+ table->null_row=0;
70+
71+ return table->status ? -1 : 0;
72+}
73+
74+int JoinTable::joinReadSystem()
75+{
76+ return join_read_system(this);
77 }
78
79 } /* namespace drizzled */
80
81=== modified file 'drizzled/join_table.h'
82--- drizzled/join_table.h 2011-03-28 21:47:10 +0000
83+++ drizzled/join_table.h 2012-01-03 02:27:26 +0000
84@@ -242,5 +242,7 @@
85 int joinReadSystem();
86 };
87
88+int join_read_system(JoinTable *tab);
89+
90 } /* namespace drizzled */
91
92
93=== modified file 'drizzled/optimizer/access_method/system.cc'
94--- drizzled/optimizer/access_method/system.cc 2011-06-28 15:16:47 +0000
95+++ drizzled/optimizer/access_method/system.cc 2012-01-03 02:27:26 +0000
96@@ -29,6 +29,6 @@
97 void optimizer::System::getStats(Table& table, JoinTable& join_tab)
98 {
99 table.status= STATUS_NO_RECORD;
100- join_tab.read_first_record= reinterpret_cast<Read_record_func>(join_tab.joinReadSystem()); // Olaf: BUG?
101+ join_tab.read_first_record= join_read_system;
102 join_tab.read_record.read_record= join_no_more_records;
103 }
104
105=== modified file 'drizzled/sql_select.cc'
106--- drizzled/sql_select.cc 2011-10-23 19:30:49 +0000
107+++ drizzled/sql_select.cc 2012-01-03 02:27:26 +0000
108@@ -5161,13 +5161,13 @@
109 join->unit->select_limit_cnt,
110 true, false) > 0;
111 }
112- if (!no_changes)
113+ if (no_changes == false)
114 {
115 if (!quick_created)
116 {
117 tab->index= best_key;
118 tab->read_first_record= best_key_direction > 0 ?
119- join_read_first:join_read_last;
120+ join_read_first : join_read_last;
121 tab->type= AM_NEXT; // Read with index_first(), index_next()
122 if (select && select->quick)
123 {
124
125=== modified file 'drizzled/util/test.h'
126--- drizzled/util/test.h 2011-03-14 05:40:28 +0000
127+++ drizzled/util/test.h 2012-01-03 02:27:26 +0000
128@@ -25,7 +25,7 @@
129 template <class T>
130 bool test(const T a)
131 {
132- return a;
133+ return bool(a);
134 }
135
136 template <class T, class U>