Placate gcc -flto
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 25 May 2014 13:40:10 +0000 (14:40 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 25 May 2014 13:40:10 +0000 (14:40 +0100)
I don't think either of these are real bugs, but it keeps the compiler
happy.

lib/trackdb.c
libtests/t-words.c

index 7fbdeb5..7d50e2e 100644 (file)
@@ -1182,6 +1182,7 @@ static int compute_alias(char **aliasp,
     }
     return 0;
   default:
+    *aliasp = 0;
     return err;
   }
 }
index af9468c..a8efde9 100644 (file)
@@ -54,6 +54,7 @@ static void test_words(void) {
   for(t = 0; t < NWTEST; ++t) {
     char **got = utf8_word_split(wtest[t].in, strlen(wtest[t].in), &ngot, 0);
 
+    assert(got != NULL);
     for(nexpect = 0; wtest[t].expect[nexpect]; ++nexpect)
       ;
     if(nexpect == ngot) {