From 48677f930d9944889ec8d2ab95fbc849af8135fa Mon Sep 17 00:00:00 2001 From: wuchenghui Date: Fri, 11 May 2018 15:34:38 +0800 Subject: [PATCH] fix missing-field-initializers warnings on gcc --- src/gflags_completions.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gflags_completions.cc b/src/gflags_completions.cc index f772486..4afc521 100644 --- a/src/gflags_completions.cc +++ b/src/gflags_completions.cc @@ -179,6 +179,11 @@ struct CompletionOptions { bool flag_description_substring_search; bool return_all_matching_flags; bool force_no_update; + CompletionOptions(): flag_name_substring_search(false), + flag_location_substring_search(false), + flag_description_substring_search(false), + return_all_matching_flags(false), + force_no_update(false) { } }; // Notable flags are flags that are special or preferred for some @@ -202,7 +207,7 @@ struct NotableFlags { static void PrintFlagCompletionInfo(void) { string cursor_word = FLAGS_tab_completion_word; string canonical_token; - CompletionOptions options = { }; + CompletionOptions options = CompletionOptions(); CanonicalizeCursorWordAndSearchOptions( cursor_word, &canonical_token,