aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-02-26 08:16:45 -0400
committerDavid Bremner <david@tethera.net>2017-02-26 08:16:45 -0400
commitbd29098e47feab7886132689e4094fe6f2593311 (patch)
treed919d3ec0c8614815122404d596ad292d7c2f184
parentc7df0cca9e91c0db7af968e0f434e1a3d602d662 (diff)
test: make T640 compatible with old C compilers
Apparently our test system does not use the same flags for compiling tests as it does for compiling notmuch. Make the test compatible with C89. Also remove one unused loop index.
-rwxr-xr-xtest/T640-database-modified.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/T640-database-modified.sh b/test/T640-database-modified.sh
index 516836b0..92758e19 100755
--- a/test/T640-database-modified.sh
+++ b/test/T640-database-modified.sh
@@ -25,6 +25,7 @@ main (int argc, char **argv)
notmuch_message_t *message, *ro_message;
notmuch_query_t *query;
notmuch_tags_t *tags;
+ int i;
EXPECT0 (notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_ONLY, &ro_db));
assert(ro_db);
@@ -36,11 +37,11 @@ main (int argc, char **argv)
query = notmuch_query_create(rw_db, "");
EXPECT0 (notmuch_query_search_messages_st (query, &messages));
- for (int count=0;
+ for (;
notmuch_messages_valid (messages);
- notmuch_messages_move_to_next (messages), count++) {
+ notmuch_messages_move_to_next (messages)) {
message = notmuch_messages_get (messages);
- for (int i=0; i<200; i++) {
+ for (i=0; i<200; i++) {
char *tag_str = talloc_asprintf(rw_db, "%d", i);
EXPECT0 (notmuch_message_add_tag (message, tag_str));
talloc_free (tag_str);