Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-06-26 18:20:48 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-06-26 18:20:48 +0300
commit6497fdfaf41d47e835fdefc78ecb0a934875d7cf (patch)
tree53b159081fac0dc61de7c981c037d3f078658272 /winsup/utils
parent6c55be9dbbd724edc5fd5b6c022e212f42754887 (diff)
Cygwin: fix bumptious GCC 7 warnings
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/dumper.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
index b2e03e883..14b993316 100644
--- a/winsup/utils/dumper.cc
+++ b/winsup/utils/dumper.cc
@@ -415,7 +415,10 @@ dumper::dump_thread (asection * to, process_thread * thread)
bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz);
bfd_putl32 (sizeof (thread_pstatus), header.elf_note_header.descsz);
bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type);
- strncpy ((char *) &header.elf_note_header.name, "win32thread", NOTE_NAME_SIZE);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+ strncpy (header.elf_note_header.name, "win32thread", NOTE_NAME_SIZE);
+#pragma GCC diagnostic pop
thread_pstatus.data_type = NOTE_INFO_THREAD;
thread_pstatus.data.thread_info.tid = thread->tid;
@@ -478,7 +481,10 @@ dumper::dump_module (asection * to, process_module * module)
bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz);
bfd_putl32 (note_length, header.elf_note_header.descsz);
bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type);
- strncpy ((char *) &header.elf_note_header.name, "win32module", NOTE_NAME_SIZE);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow"
+ strncpy (header.elf_note_header.name, "win32module", NOTE_NAME_SIZE);
+#pragma GCC diagnostic pop
module_pstatus_ptr->data_type = NOTE_INFO_MODULE;
module_pstatus_ptr->data.module_info.base_address = module->base_address;