reader: Fix a compilation warning

Message ID 87h78ij6eg.fsf@seketeli.org
State New
Headers
Series reader: Fix a compilation warning |

Commit Message

Dodji Seketeli March 1, 2022, 10:47 a.m. UTC
  Hello,

I came across this compilation warning.  Fixed thus.

	* src/abg-reader.cc (build_var_decl): Add braces to an 'if'
	statement.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 src/abg-reader.cc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
  

Patch

diff --git a/src/abg-reader.cc b/src/abg-reader.cc
index 7070fa9f..31885692 100644
--- a/src/abg-reader.cc
+++ b/src/abg-reader.cc
@@ -3802,9 +3802,11 @@  build_var_decl(read_context&	ctxt,
 
   ctxt.push_decl_to_current_scope(decl, add_to_current_scope);
   if (add_to_current_scope)
-    // This variable is really being kept in the IR, so let's record
-    // that it's using its type.
-    RECORD_ARTIFACT_AS_USED_BY(ctxt, underlying_type, decl);
+    {
+      // This variable is really being kept in the IR, so let's record
+      // that it's using its type.
+      RECORD_ARTIFACT_AS_USED_BY(ctxt, underlying_type, decl);
+    }
 
   if (decl->get_symbol() && decl->get_symbol()->is_public())
     decl->set_is_in_public_symbol_table(true);