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:
committed by
waddlesplash
parent
64b7d332ba
commit
1c3b53c446
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user