3131void test_syscall_ins (void );
3232extern const char test_page [];
3333
34- static void const * current_test_page_addr = test_page ;
34+ static const void * current_test_page_addr = test_page ;
3535
3636/* State used by our signal handlers. */
3737static gregset_t initial_regs ;
@@ -40,7 +40,7 @@ static volatile unsigned long rip;
4040
4141static void sigsegv_for_sigreturn_test (int sig , siginfo_t * info , void * ctx_void )
4242{
43- ucontext_t * ctx = (ucontext_t * )ctx_void ;
43+ ucontext_t * ctx = (ucontext_t * )ctx_void ;
4444
4545 if (rip != ctx -> uc_mcontext .gregs [REG_RIP ]) {
4646 printf ("[FAIL]\tRequested RIP=0x%lx but got RIP=0x%lx\n" ,
@@ -56,7 +56,7 @@ static void sigsegv_for_sigreturn_test(int sig, siginfo_t *info, void *ctx_void)
5656
5757static void sigusr1 (int sig , siginfo_t * info , void * ctx_void )
5858{
59- ucontext_t * ctx = (ucontext_t * )ctx_void ;
59+ ucontext_t * ctx = (ucontext_t * )ctx_void ;
6060
6161 memcpy (& initial_regs , & ctx -> uc_mcontext .gregs , sizeof (gregset_t ));
6262
@@ -69,8 +69,6 @@ static void sigusr1(int sig, siginfo_t *info, void *ctx_void)
6969 ctx -> uc_mcontext .gregs [REG_R11 ]);
7070
7171 sethandler (SIGSEGV , sigsegv_for_sigreturn_test , SA_RESETHAND );
72-
73- return ;
7472}
7573
7674static void test_sigreturn_to (unsigned long ip )
@@ -84,7 +82,7 @@ static jmp_buf jmpbuf;
8482
8583static void sigsegv_for_fallthrough (int sig , siginfo_t * info , void * ctx_void )
8684{
87- ucontext_t * ctx = (ucontext_t * )ctx_void ;
85+ ucontext_t * ctx = (ucontext_t * )ctx_void ;
8886
8987 if (rip != ctx -> uc_mcontext .gregs [REG_RIP ]) {
9088 printf ("[FAIL]\tExpected SIGSEGV at 0x%lx but got RIP=0x%lx\n" ,
@@ -130,7 +128,7 @@ static void test_syscall_fallthrough_to(unsigned long ip)
130128 printf ("[OK]\tWe survived\n" );
131129}
132130
133- int main ()
131+ int main (void )
134132{
135133 /*
136134 * When the kernel returns from a slow-path syscall, it will
0 commit comments