summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2016-03-13 22:51:02 +0100
committerFrank Gevaerts <frank@gevaerts.be>2016-03-13 22:52:45 +0100
commitb58b9c26c94a7b5581188fb091a770d0b25a7c32 (patch)
treeb94b0a5e8b6d2145161532413706ac543a4a95dd
parent2c7bb67302858f01b74ab73aafa71c095383bda3 (diff)
downloadrockbox-b58b9c26c94a7b5581188fb091a770d0b25a7c32.tar.gz
rockbox-b58b9c26c94a7b5581188fb091a770d0b25a7c32.zip
Remove clearly broken error checking, as pointed out by newer gcc.
Note that the error checking is probably useful if done correctly, but I have no way to test this, so just removing the offending code is the only way forward. Thanks to the fairly creative bug, the code did nothing at all anyway. Change-Id: Ifeef57202f31e842ca1befa331f8b34e1c76757c
-rw-r--r--apps/plugins/goban/sgf.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/plugins/goban/sgf.c b/apps/plugins/goban/sgf.c
index 42d4da3365..49dd28ff93 100644
--- a/apps/plugins/goban/sgf.c
+++ b/apps/plugins/goban/sgf.c
@@ -1261,13 +1261,6 @@ read_comment_sgf (char *buffer, size_t buffer_size)
1261 return -1; 1261 return -1;
1262 } 1262 }
1263 1263
1264 if (!read_char_no_whitespace (unhandled_fd) == 'C' ||
1265 !read_char_no_whitespace (unhandled_fd) == '[')
1266 {
1267 DEBUGF ("comment prop points to incorrect place in unhandled_fd!!\n");
1268 return -1;
1269 }
1270
1271 /* make output a string, the lazy way */ 1264 /* make output a string, the lazy way */
1272 rb->memset (buffer, 0, buffer_size); 1265 rb->memset (buffer, 0, buffer_size);
1273 ++bytes_read; 1266 ++bytes_read;
@@ -1358,16 +1351,7 @@ write_comment_sgf (char *string)
1358 1351
1359 start_of_write_wcs: 1352 start_of_write_wcs:
1360 1353
1361 if (overwriting) 1354 if (!overwriting)
1362 {
1363 if (!read_char_no_whitespace (unhandled_fd) == 'C' ||
1364 !read_char_no_whitespace (unhandled_fd) == '[')
1365 {
1366 DEBUGF ("non-comment while overwriting!!\n");
1367 return -1;
1368 }
1369 }
1370 else
1371 { 1355 {
1372 start_of_comment = rb->lseek (unhandled_fd, 0, SEEK_END); 1356 start_of_comment = rb->lseek (unhandled_fd, 0, SEEK_END);
1373 1357