Fix warning in nptl/tst-stack4.c.
This patch fixes a warning in a test that was added since my recent warning cleanup: tst-stack4.c: In function 'dso_process': tst-stack4.c:64:7: warning: format '%i' expects argument of type 'int', but argument 3 has type 'uintptr_t' [-Wformat=] The original variable has type int then is cast to uintptr_t, and from there to void *, to pass it to a thread, so reversing the process by casting to uintptr_t and then to int is natural; this patch does so. Tested for x86_64. * nptl/tst-stack4.c (dso_process): Use int not uintptr_t for t.
This commit is contained in:
parent
4e0b901601
commit
909e16d960
@ -1,5 +1,7 @@
|
|||||||
2014-12-02 Joseph Myers <joseph@codesourcery.com>
|
2014-12-02 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* nptl/tst-stack4.c (dso_process): Use int not uintptr_t for t.
|
||||||
|
|
||||||
* nptl/tst-mutex1.c: Include <stdbool.h>.
|
* nptl/tst-mutex1.c: Include <stdbool.h>.
|
||||||
[!ATTR] (ATTR_NULL): New macro.
|
[!ATTR] (ATTR_NULL): New macro.
|
||||||
(do_test): Test !ATTR_NULL instead of ATTR != NULL.
|
(do_test): Test !ATTR_NULL instead of ATTR != NULL.
|
||||||
|
@ -56,7 +56,7 @@ dso_process (void * p)
|
|||||||
function fun_vec[DSO_SHARED_FILES];
|
function fun_vec[DSO_SHARED_FILES];
|
||||||
char dso_path[DSO_SHARED_FILES][100];
|
char dso_path[DSO_SHARED_FILES][100];
|
||||||
int dso;
|
int dso;
|
||||||
uintptr_t t = (uintptr_t) p;
|
int t = (int) (uintptr_t) p;
|
||||||
|
|
||||||
/* Open DSOs and get a function. */
|
/* Open DSOs and get a function. */
|
||||||
for (dso = 0; dso < DSO_SHARED_FILES; dso++)
|
for (dso = 0; dso < DSO_SHARED_FILES; dso++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user