]> git.sesse.net Git - plocate/commitdiff
fix maybe-uninitialized warning in parse_trigrams
authorArsen Arsenović <arsen@aarsen.me>
Mon, 23 Aug 2021 22:16:34 +0000 (00:16 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 4 Sep 2021 22:57:37 +0000 (00:57 +0200)
parse_trigrams.h

index 9c8cdf2b62a7b80b565a5e3447fb7531260de3b2..c845cdeab93cec0f0803b01d01cda232e422b546 100644 (file)
@@ -11,7 +11,7 @@
 // One or more trigrams, with an implicit OR between them. For case-sensitive searches,
 // this is just e.g. “abc”, but for case-insensitive, it would be “abc OR abC or aBc ...” etc.
 struct TrigramDisjunction {
-       unsigned index;  // For debugging only.
+       unsigned index = -1;  // For debugging only.
 
        // The alternatives as determined by parse_trigrams().
        std::vector<uint32_t> trigram_alternatives;