Skip to content

Commit

Permalink
Cast strtol return to unsigned long
Browse files Browse the repository at this point in the history
	* testsuite/test-strtol.c (run_tests): Cast strtol return to
	unsigned long.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217429 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
hjl committed Nov 12, 2014
1 parent 7a0c641 commit 5ceed41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libiberty/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2014-11-12 Kirill Yukhin <[email protected]>

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

2014-11-11 Anthony Brandon <[email protected]>
Manuel López-Ibáñez <[email protected]>

Expand Down
3 changes: 2 additions & 1 deletion libiberty/testsuite/test-strtol.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5ceed41

Please sign in to comment.