From: Friedrich Beckmann Date: Sat, 4 Jun 2016 22:44:26 +0000 (+0200) Subject: tab.c: Compile error in debug mode X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=000e9b61f0acc611f03f27a8f068a9ccf4910e0b;p=pspp tab.c: Compile error in debug mode tab.c could not be compile with --enable-debug configuration because the return value did not fit with the function. In addition a typo in a "bad cell" check was fixed. --- diff --git a/src/output/tab.c b/src/output/tab.c index db384bdfc9..519be545f2 100644 --- a/src/output/tab.c +++ b/src/output/tab.c @@ -528,7 +528,7 @@ add_joined_cell (struct tab_table *table, int x1, int y1, int x2, int y2, if (x1 + table->col_ofs < 0 || x1 + table->col_ofs >= tab_nc (table) || y1 + table->row_ofs < 0 || y1 + table->row_ofs >= tab_nr (table) || x2 < x1 || x2 + table->col_ofs >= tab_nc (table) - || y2 < y2 || y2 + table->row_ofs >= tab_nr (table)) + || y2 < y1 || y2 + table->row_ofs >= tab_nr (table)) { printf ("tab_joint_text(): bad cell " "(%d+%d=%d,%d+%d=%d)-(%d+%d=%d,%d+%d=%d) in table size (%d,%d)\n", @@ -537,7 +537,7 @@ add_joined_cell (struct tab_table *table, int x1, int y1, int x2, int y2, x2, table->col_ofs, x2 + table->col_ofs, y2, table->row_ofs, y2 + table->row_ofs, tab_nc (table), tab_nr (table)); - return; + return NULL; } #endif