Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: tests/mmap/mmap_test.cc

Issue 1148953002: Cast pointers used with %p format strings to void * (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/mmap/mmap_prot_test.c ('k') | tests/stack_alignment/stack_alignment_asm_test.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/mmap/mmap_test.cc
diff --git a/tests/mmap/mmap_test.cc b/tests/mmap/mmap_test.cc
index 52757d1933ff62ad9e4277efff8a6438dd27aa72..52f535b96c663157779d99a607a3030817f51f64 100644
--- a/tests/mmap/mmap_test.cc
+++ b/tests/mmap/mmap_test.cc
@@ -81,7 +81,7 @@ static void assert_addr_is_unreadable(volatile char *addr) {
char value = *addr;
/* If we reach here, the assertion failed. */
fprintf(stderr, "Address %p was readable, and contained %i\n",
- addr, value);
+ static_cast<void *>(addr), value);
Derek Schuff 2015/05/20 22:03:44 so, you can't cast away volatile like this with an
khimg 2015/05/20 22:16:18 Ugh. uintptr_t would properly require not %x but %
Derek Schuff 2015/05/22 16:38:49 agreed; switched to c-style casts with comment.
exit(1);
}
/*
@@ -121,7 +121,7 @@ static void assert_addr_is_unwritable(volatile char *addr, char value) {
*addr = value;
/* If we reach here, the assertion failed. */
fprintf(stderr, "Address %p was writable, %i was written\n",
- addr, value);
+ static_cast<void *>(addr), value);
exit(1);
}
/*
« no previous file with comments | « tests/mmap/mmap_prot_test.c ('k') | tests/stack_alignment/stack_alignment_asm_test.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698