Fix userprog tests for clang
[pintos-anon] / src / tests / userprog / bad-read.c
index 904c278a0e307d1ebc22fdbdb77da74e64849818..d821a9a1fd15a228b2a7287f6a1a74f209372671 100644 (file)
@@ -8,6 +8,6 @@ void
 test_main (void) 
 {
   msg ("Congratulations - you have successfully dereferenced NULL: %d", 
-        *(int *)NULL);
+        *(volatile int *) NULL);
   fail ("should have exited with -1");
 }