From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH setup] Fix error with gcc 10.2 and -Werror=format
Date: Thu, 24 Sep 2020 22:23:13 +0100 [thread overview]
Message-ID: <20200924212313.58576-1-jon.turney@dronecode.org.uk> (raw)
archive_tar.cc: In member function ‘virtual const string archive_tar::next_file_name()’:
archive_tar.cc:161:37: error: 'I' flag used with ‘%o’ gnu_scanf format [-Werror=format=]
archive_tar.cc:161:37: error: format ‘%o’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘size_t*’ {aka ‘long long unsigned int*’} [-Werror=format=]
archive_tar.cc:181:38: error: 'I' flag used with ‘%o’ gnu_scanf format [-Werror=format=]
archive_tar.cc:181:38: error: format ‘%o’ expects argument of type ‘unsigned int*’, but argument 3 has type ‘size_t*’ {aka ‘long long unsigned int*’} [-Werror=format=]
---
archive_tar.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/archive_tar.cc b/archive_tar.cc
index 05c3f6e..c359238 100644
--- a/archive_tar.cc
+++ b/archive_tar.cc
@@ -158,7 +158,7 @@ archive_tar::next_file_name ()
else if (state.have_longname)
state.have_longname = 0;
- sscanf (state.tar_header.size, "%Io", &state.file_length);
+ sscanf (state.tar_header.size, "%zo", &state.file_length);
state.file_offset = 0;
if (_tar_verbose)
@@ -178,7 +178,7 @@ archive_tar::next_file_name ()
CYG_PATH_MAX);
err++;
state.parent->read (&state.tar_header, 512);
- sscanf (state.tar_header.size, "%Io", &state.file_length);
+ sscanf (state.tar_header.size, "%zo", &state.file_length);
state.file_offset = 0;
skip_file ();
return next_file_name ();
--
2.28.0
reply other threads:[~2020-09-24 21:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200924212313.58576-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).