Cast strtol return to unsigned long
authorKirill Yukhin <kirill.yukhin@intel.com>
Wed, 12 Nov 2014 16:24:30 +0000 (16:24 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 12 Nov 2014 16:24:30 +0000 (08:24 -0800)
* testsuite/test-strtol.c (run_tests): Cast strtol return to
unsigned long.

From-SVN: r217429

libiberty/ChangeLog
libiberty/testsuite/test-strtol.c

index 98a7c5b34bcedc5b0c24f4ca2093b93f5fc3d7a3..82a49ea013c0f6f9e8817f2d5d3f8150140cfabd 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-12  Kirill Yukhin  <kirill.yukhin@intel.com>
+
+       * testsuite/test-strtol.c (run_tests): Cast strtol return to
+       unsigned long.
+
 2014-11-11  Anthony Brandon  <anthony.brandon@gmail.com>
            Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
index 96d6871c777c9dd7877cf12caec25ee135c21ed1..6faf81b5cae4d764bb8475e0cb964c0bfc1248ff 100644 (file)
@@ -132,7 +132,8 @@ run_tests (const struct test_data_t *test_data, size_t ntests)
       switch (test_data[i].fun)
        {
        case STRTOL:
-         res = strtol (test_data[i].nptr, 0, test_data[i].base);
+         res = (unsigned long) strtol (test_data[i].nptr,
+                                       0, test_data[i].base);
          break;
        case STRTOUL:
          res = strtoul (test_data[i].nptr, 0, test_data[i].base);