From ac33a407acc5d00aa5a8617d4272b6a2ad01c480 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Mon, 9 Nov 2009 23:07:30 +0000 Subject: [PATCH] 2009-11-10 Doug Kwan * i386.cc (Target_i386::do_calls_non_split): Add a cast to avoid a format warning. * incremental.cc (open_incremental_binary): Initialized local variables to avoid warnings. * object.cc (make_elf_object): Ditto. * x86_64.cc (Target_x86_64::do_calls_non_split): Add a cast to avoid a format warning. --- gold/ChangeLog | 10 ++++++++++ gold/i386.cc | 2 +- gold/incremental.cc | 4 ++-- gold/object.cc | 4 ++-- gold/x86_64.cc | 2 +- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 4ee272224c0..1432e529fc1 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,13 @@ +2009-11-10 Doug Kwan + + * i386.cc (Target_i386::do_calls_non_split): Add a cast to avoid + a format warning. + * incremental.cc (open_incremental_binary): Initialized local + variables to avoid warnings. + * object.cc (make_elf_object): Ditto. + * x86_64.cc (Target_x86_64::do_calls_non_split): Add a cast to avoid + a format warning. + 009-11-09 H.J. Lu PR gold/10930 diff --git a/gold/i386.cc b/gold/i386.cc index c48a019ab68..3e0ddcb0341 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -2716,7 +2716,7 @@ Target_i386::do_calls_non_split(Relobj* object, unsigned int shndx, if (!object->has_no_split_stack()) object->error(_("failed to match split-stack sequence at " "section %u offset %0zx"), - shndx, fnoffset); + shndx, static_cast(fnoffset)); return; } diff --git a/gold/incremental.cc b/gold/incremental.cc index 519f35fe150..71ffd02bd14 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -388,8 +388,8 @@ open_incremental_binary(Output_file* file) return NULL; } - int size; - bool big_endian; + int size = 0; + bool big_endian = false; std::string error; if (!elfcpp::Elf_recognizer::is_valid_header(p, want, &size, &big_endian, &error)) diff --git a/gold/object.cc b/gold/object.cc index 80897743aef..eeacdaa6e7f 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -2310,8 +2310,8 @@ make_elf_object(const std::string& name, Input_file* input_file, off_t offset, *punconfigured = false; std::string error; - bool big_endian; - int size; + bool big_endian = false; + int size = 0; if (!elfcpp::Elf_recognizer::is_valid_header(p, bytes, &size, &big_endian, &error)) { diff --git a/gold/x86_64.cc b/gold/x86_64.cc index cbc45beda15..5526f6fe089 100644 --- a/gold/x86_64.cc +++ b/gold/x86_64.cc @@ -2705,7 +2705,7 @@ Target_x86_64::do_calls_non_split(Relobj* object, unsigned int shndx, if (!object->has_no_split_stack()) object->error(_("failed to match split-stack sequence at " "section %u offset %0zx"), - shndx, fnoffset); + shndx, static_cast(fnoffset)); return; } -- 2.30.2