Suppress warning and fix assert in proc_pop_ctx
authorAndrew Waterman <waterman@cs.berkeley.edu>
Tue, 23 Apr 2013 10:03:03 +0000 (03:03 -0700)
committerAndrew Waterman <waterman@cs.berkeley.edu>
Tue, 23 Apr 2013 10:03:03 +0000 (03:03 -0700)
kern/arch/riscv/process.c

index b9f7534..3594a0c 100644 (file)
@@ -12,8 +12,9 @@
 void proc_pop_ctx(struct user_context *ctx)
 {
        struct hw_trapframe *tf = &ctx->tf.hw_tf;
-       assert(ctx->type = ROS_HW_CTX);
-       extern void env_pop_tf(struct hw_trapframe *tf);        /* in asm */
+       assert(ctx->type == ROS_HW_CTX);
+       extern void env_pop_tf(struct hw_trapframe *tf)
+         __attribute__((noreturn));    /* in asm */
        env_pop_tf(tf);
 }