FindPanel: fix branch condition evaluates to a garbage value

Fixed dynamicDate used without initialization at line 730,
since GetPredicateString() might not set value to dynamicDate.
Pointed out by Clang Static Analyzer.

Change-Id: I4698fdada4b91183c7bdba5aa980ddc6b55e6312
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7946
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Murai Takashi
2024-08-27 15:28:54 +00:00
committed by waddlesplash
parent 64b7d332ba
commit 1c3b53c446
+1 -1
View File
@@ -723,7 +723,7 @@ FindWindow::SaveQueryAsAttributes(BNode* file, BEntry* entry, bool queryTemplate
? B_QUERY_TEMPLATE_MIMETYPE : B_QUERY_MIMETYPE);
BString predicate;
bool dynamicDate;
bool dynamicDate = false;
GetPredicateString(predicate, dynamicDate);
file->WriteAttrString(kAttrQueryString, &predicate);