diff options
| author | Mark Stapp <mjs@cisco.com> | 2025-01-30 11:39:00 -0500 |
|---|---|---|
| committer | Mark Stapp <mjs@cisco.com> | 2025-04-08 14:41:26 -0400 |
| commit | 028872bf40fa1a6a165289f6fe278e45fad9d04a (patch) | |
| tree | 136f0f60e51e7193eef54608f2dd109d6d6d9a70 /lib/printf/vfprintf.c | |
| parent | d683c4d8de15bb446247909cbe97e3cd19c2e0fb (diff) | |
lib: fix -Wshadow warnings in the lib modules
Fix various "shadow" warnings in lib.
Signed-off-by: Mark Stapp <mjs@cisco.com>
Diffstat (limited to 'lib/printf/vfprintf.c')
| -rw-r--r-- | lib/printf/vfprintf.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/printf/vfprintf.c b/lib/printf/vfprintf.c index 3f6700c838..12c4dad683 100644 --- a/lib/printf/vfprintf.c +++ b/lib/printf/vfprintf.c @@ -556,23 +556,23 @@ reswitch: switch (ch) { case 'G': if (flags & LONGDBL) { long double arg = GETARG(long double); - char fmt[6] = "%.*L"; - fmt[4] = ch; - fmt[5] = '\0'; + char lfmt[6] = "%.*L"; + lfmt[4] = ch; + lfmt[5] = '\0'; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" - snprintf(buf, sizeof(buf), fmt, prec, arg); + snprintf(buf, sizeof(buf), lfmt, prec, arg); #pragma GCC diagnostic pop } else { double arg = GETARG(double); - char fmt[5] = "%.*"; - fmt[3] = ch; - fmt[4] = '\0'; + char lfmt[5] = "%.*"; + lfmt[3] = ch; + lfmt[4] = '\0'; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" - snprintf(buf, sizeof(buf), fmt, prec, arg); + snprintf(buf, sizeof(buf), lfmt, prec, arg); #pragma GCC diagnostic pop } cp = buf; |
