Cast strtol return to unsigned long

* testsuite/test-strtol.c (run_tests): Cast strtol return to
	unsigned long.

From-SVN: r217429
This commit is contained in:
Kirill Yukhin 2014-11-12 16:24:30 +00:00 committed by H.J. Lu
parent 4feb5dd860
commit 43cf21c686
2 changed files with 7 additions and 1 deletions

View 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>

View 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);