chiark / gitweb /
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 7fbdeb5817debecb902306176468d1b4cf6191a1..7d50e2ef71f0cf71a461bf7774fd2928bf5a112e 100644 (file)
@@ -1182,6 +1182,7 @@ static int compute_alias(char **aliasp,
     }
     return 0;
   default:
+    *aliasp = 0;
     return err;
   }
 }
index af9468ceae72efacf51add08be5981508b0c4e73..a8efde9e8c2c9ed3c62b3d8aa1497db7472a397f 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) {