This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold commit] Fix integer narrowing warning


A couple of parameters in Sized_target::record_gnu_property should have
been unsigned int.

-cary


2018-08-06  Cary Coutant  <ccoutant@gmail.com>

gold/
	* target.h (Sized_target::record_gnu_property): Change first two
	parameters to unsigned int.
	* x86_64.cc (Target_x86_64::record_gnu_property): Likewise.


diff --git a/gold/target.h b/gold/target.h
index bb312067b5..bbc87396f6 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -1147,7 +1147,8 @@ class Sized_target : public Target
   // Record a target-specific program property in the .note.gnu.property
   // section.
   virtual void
-  record_gnu_property(int, int, size_t, const unsigned char*, const Object*)
+  record_gnu_property(unsigned int, unsigned int, size_t,
+		      const unsigned char*, const Object*)
   { }
 
   // Merge the target-specific program properties from the current object.
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 27f273d64b..9d742f6f13 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -1307,7 +1307,8 @@ class Target_x86_64 : public Sized_target<size, false>
   // Record a target-specific program property in the .note.gnu.property
   // section.
   void
-  record_gnu_property(int, int, size_t, const unsigned char*, const Object*);
+  record_gnu_property(unsigned int, unsigned int, size_t,
+		      const unsigned char*, const Object*);
 
   // Merge the target-specific program properties from the current object.
   void
@@ -1579,7 +1580,7 @@ Target_x86_64<size>::rela_irelative_section(Layout* layout)
 template<int size>
 void
 Target_x86_64<size>::record_gnu_property(
-    int, int pr_type,
+    unsigned int, unsigned int pr_type,
     size_t pr_datasz, const unsigned char* pr_data,
     const Object* object)
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]