]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
TODO: cheri: printf: fix unused variable warning
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 10 Oct 2022 12:34:36 +0000 (13:34 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 12 Oct 2022 13:22:03 +0000 (14:22 +0100)
warning happens in non-purecap build.

TODO: squash into original cheri printf change

stdio-common/vfprintf-internal.c

index 6bda3a2b278c6ea40f66f7a69aed8635b160d660..c2f1904b7de35a8c58c1ad006581ef13786ddf5a 100644 (file)
@@ -812,6 +812,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap, unsigned int mode_flags)
       int is_char = 0; /* Argument is promoted (unsigned) char.  */
       int width = 0;   /* Width of output; 0 means none specified.  */
       int prec = -1;   /* Precision of output; -1 means none specified.  */
+      __attribute__((unused))
       int is_cap = 0;  /* Argument is a capability.  */
 
       /* This flag is set by the 'I' modifier and selects the use of the
@@ -1350,6 +1351,7 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format,
       int is_long = specs[nspecs_done].info.is_long;
       int width = specs[nspecs_done].info.width;
       int prec = specs[nspecs_done].info.prec;
+      __attribute__((unused))
       int is_cap = specs[nspecs_done].info.is_cap;
       int use_outdigits = specs[nspecs_done].info.i18n;
       char pad = specs[nspecs_done].info.pad;