]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: Fix a warning found by -Wextra
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 7 May 2021 14:31:21 +0000 (09:31 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 7 May 2021 14:31:21 +0000 (09:31 -0500)
The code probably can't actually fall through to the next case
since the true branch is an error case, but it looks cleaner this way.

vm/alien.cpp

index 894ba2d4c8fe25001055b1a79334a6c8d3da57e0..8b6cc81b765b00773931de952ad205479be4087b 100644 (file)
@@ -12,8 +12,7 @@ char* factor_vm::pinned_alien_offset(cell obj) {
         general_error(ERROR_EXPIRED, obj, false_object);
       if (to_boolean(ptr->base))
         type_error(ALIEN_TYPE, obj);
-      else
-        return (char*)ptr->address;
+      return (char*)ptr->address;
     }
     case F_TYPE:
       return NULL;