2010-02-22 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Mon, 22 Feb 2010 18:26:29 +0000 (18:26 +0000)
committerDoug Kwan <dougkwan@google.com>
Mon, 22 Feb 2010 18:26:29 +0000 (18:26 +0000)
* gold-threads.h (Once::~Once): Explicitly define virtual destructor.
* icf.cc (get_section_contents): Cast snprintf arguments to long long
types to avoid warnings due to different uint64_t implementations
on different hosts.

gold/ChangeLog
gold/gold-threads.h
gold/icf.cc

index c9e60052530404397af7c0642973cab841d7c5e2..056a506c704fcf189a76f84426b6a02fcad0dac0 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-22  Doug Kwan  <dougkwan@google.com>
+
+       * gold-threads.h (Once::~Once): Explicitly define virtual destructor.
+       * icf.cc (get_section_contents): Cast snprintf arguments to long long
+       types to avoid warnings due to different uint64_t implementations
+       on different hosts.
+
 2010-02-21  Doug Kwan  <dougkwan@google.com>
 
        * arm.cc (Arm_relocate_functions::arm_branch_common): Fix bug in
index 78a87b24d645221839425b3ff3060067e9b4aba9..622bf329d166a9393e128f38684612d93fb57e88 100644 (file)
@@ -200,6 +200,10 @@ class Once
  public:
   Once();
 
+  virtual
+  ~Once()
+  { }
+
   // Call this function to do whatever it is.  We pass an argument
   // even though you have to use a child class because in some uses
   // setting the argument would itself require a Once class.
index 752aa5599c11af0f3f1a7cc2237d01edf764f6b4..ff2058cfcbacdd73e1463b09361344fa0f32b744 100644 (file)
@@ -278,8 +278,13 @@ get_section_contents(bool first_iteration,
           // where first is the symbol value and second is the
           // addend.
           char addend_str[50];
-          snprintf(addend_str, sizeof(addend_str), "%llx %llx %lux",
-                   (*it_a).first, (*it_a).second, (*it_o));
+
+         // It would be nice if we could use format macros in inttypes.h
+         // here but there are not in ISO/IEC C++ 1998.
+          snprintf(addend_str, sizeof(addend_str), "%llx %llx %llux",
+                   static_cast<long long>((*it_a).first),
+                  static_cast<long long>((*it_a).second),
+                  static_cast<unsigned long long>(*it_o));
           Section_id reloc_secn(it_v->first, it_v->second);
 
           // If this reloc turns back and points to the same section,
This page took 0.033975 seconds and 4 git commands to generate.