From 88eae9dabbb57ddc697dd64e33c145775d4bb663 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 14 Mar 2014 08:58:43 +0100 Subject: command/{storage,file}: suppress bogus format warnings on WIN32 --- src/command/FileCommands.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/command/FileCommands.cxx') diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx index f7ca28b50..7b69b0bd9 100644 --- a/src/command/FileCommands.cxx +++ b/src/command/FileCommands.cxx @@ -59,6 +59,13 @@ skip_path(const char *name_fs) return strchr(name_fs, '\n') != nullptr; } +#if defined(WIN32) && GCC_CHECK_VERSION(4,6) +/* PRIu64 causes bogus compiler warning */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" +#pragma GCC diagnostic ignored "-Wformat-extra-args" +#endif + CommandResult handle_listfiles_local(Client &client, const char *path_utf8) { @@ -109,6 +116,10 @@ handle_listfiles_local(Client &client, const char *path_utf8) return CommandResult::OK; } +#if defined(WIN32) && GCC_CHECK_VERSION(4,6) +#pragma GCC diagnostic pop +#endif + gcc_pure static bool IsValidName(const char *p) -- cgit v1.2.3