Enable -Wformat=2 if it's supported.
This commit is contained in:
parent
bbac6789aa
commit
ae558c2ccf
15 changed files with 57 additions and 1 deletions
|
@ -154,6 +154,8 @@ label_get_minimal_size (void *vself, unsigned *width, unsigned *height)
|
|||
+ grub_font_get_descent (self->font));
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static void
|
||||
label_set_state (void *vself, int visible, int start __attribute__ ((unused)),
|
||||
int current, int end __attribute__ ((unused)))
|
||||
|
@ -235,6 +237,8 @@ label_set_property (void *vself, const char *name, const char *value)
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic error "-Wformat-nonliteral"
|
||||
|
||||
static struct grub_gui_component_ops label_ops =
|
||||
{
|
||||
.destroy = label_destroy,
|
||||
|
|
|
@ -183,6 +183,8 @@ draw_pixmap_bar (grub_gui_progress_bar_t self)
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static void
|
||||
draw_text (grub_gui_progress_bar_t self)
|
||||
{
|
||||
|
@ -212,6 +214,8 @@ draw_text (grub_gui_progress_bar_t self)
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic error "-Wformat-nonliteral"
|
||||
|
||||
static void
|
||||
progress_bar_paint (void *vself, const grub_video_rect_t *region)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <grub/i386/pc/vesa_modes_table.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
struct legacy_command
|
||||
{
|
||||
const char *name;
|
||||
|
|
|
@ -237,6 +237,8 @@ have_devfs (void)
|
|||
return dev_devfsd_exists;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static int
|
||||
grub_hostdisk_linux_find_partition (char *dev, grub_disk_addr_t sector)
|
||||
{
|
||||
|
@ -325,6 +327,8 @@ grub_hostdisk_linux_find_partition (char *dev, grub_disk_addr_t sector)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic error "-Wformat-nonliteral"
|
||||
|
||||
void
|
||||
grub_hostdisk_flush_initial_buffer (const char *os_dev)
|
||||
{
|
||||
|
|
|
@ -229,6 +229,9 @@ grub_partition_msdos_iterate (grub_disk_t disk,
|
|||
}
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static grub_err_t
|
||||
pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
|
||||
unsigned int max_nsectors,
|
||||
|
@ -401,6 +404,9 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
|
|||
N_("your embedding area is unusually small. "
|
||||
"core.img won't fit in it."));
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic error "-Wformat-nonliteral"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -158,6 +158,8 @@ get_space(grub_size_t need)
|
|||
}
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
|
||||
static inline void
|
||||
save_text(const char *fmt, const char *s, int len)
|
||||
{
|
||||
|
@ -183,6 +185,8 @@ save_number(const char *fmt, int number, int len)
|
|||
out_used += grub_strlen(out_buff + out_used);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic error "-Wformat-nonliteral"
|
||||
|
||||
static inline void
|
||||
save_char(int c)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue