Fixed compile warning for unused variable in primitive.c