projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix userprog tests for clang
[pintos-anon]
/
src
/
tests
/
userprog
/
bad-jump.c
diff --git
a/src/tests/userprog/bad-jump.c
b/src/tests/userprog/bad-jump.c
index 51b7c9f57ea6a15cfe60a254a7fb3cd04fae87ea..a915c396b874e5338daecf0cd3f4d6aa1150deee 100644
(file)
--- a/
src/tests/userprog/bad-jump.c
+++ b/
src/tests/userprog/bad-jump.c
@@
-4,10
+4,13
@@
#include "tests/lib.h"
#include "tests/main.h"
#include "tests/lib.h"
#include "tests/main.h"
+typedef int (* volatile functionptr)(void);
+
void
test_main (void)
{
void
test_main (void)
{
+ functionptr fp = NULL;
msg ("Congratulations - you have successfully called NULL: %d",
msg ("Congratulations - you have successfully called NULL: %d",
-
((int (*)(void))NULL)
());
+
fp
());
fail ("should have exited with -1");
}
fail ("should have exited with -1");
}