]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix error: macro may be used uninitialized
authorAlan Modra <amodra@gmail.com>
Fri, 20 Dec 2024 22:03:23 +0000 (08:33 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 24 Dec 2024 04:24:05 +0000 (14:54 +1030)
PR 32391 commit 9f2e3c21f6 fallout

gas/macro.c

index a0f2a5c764c52ff35f3835216561b210f070dee3..3d5a9f14341d00fd47277f3c7521b78a11c2319a 100644 (file)
@@ -1411,7 +1411,6 @@ check_macro (const char *line, sb *expand,
 {
   const char *s;
   char *copy, *cls;
-  macro_entry *macro;
   sb line_sb;
 
   if (! macros_defined)
@@ -1431,8 +1430,8 @@ check_macro (const char *line, sb *expand,
   for (cls = copy; *cls != '\0'; cls ++)
     *cls = TOLOWER (*cls);
 
-  int i;
-  for (i = macro_nesting_depth; i >= 0; i--)
+  macro_entry *macro = NULL;
+  for (int i = macro_nesting_depth; i >= 0; i--)
     {
       macro = str_hash_find (macro_hash[i], copy);
       if (macro != NULL)