More strict GCC warnings

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Fix range_is_empty() check

GCC reports the following problem in range_is_empty()

  include/jit/vars.h: In function ‘range_is_empty’:
  include/jit/vars.h:45:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Fix it.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
x86-64: Add default case to native_call()

GCC points out that:

  arch/x86/call.c: In function ‘native_call’:
  arch/x86/call.c:247:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Fix unsigned int comparisons in vm/types.c

Spotted by GCC:

  vm/types.c: In function ‘vmtype_to_bytecode_type’:
  vm/types.c:119:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  vm/types.c: In function ‘get_vm_type_name’:
  vm/types.c:140:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
x86: Fix unsigned int comparison in x86_encode_reg()

Spotted by GCC:

  arch/x86/encode.c: In function ‘x86_encode_reg’:
  arch/x86/encode.c:109:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
jit: Add default case to mark_clobbers()

Spotted by GCC:

  jit/clobber.c: In function ‘mark_clobbers’:
  jit/clobber.c:102:4: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
jit: Fix initializer in do_convert_bb_to_ir()

Spotted by GCC:

  jit/bytecode-to-ir.c: In function ‘do_convert_bb_to_ir’:
  jit/bytecode-to-ir.c:200:9: warning: missing initializer [-Wmissing-field-initializers]
  jit/bytecode-to-ir.c:200:9: warning: (near initialization for ‘buffer.buffer’) [-Wmissing-field-initializers]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Fix old style declarations

Spotted by GCC:

  vm/jni-interface.c:1676:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
  vm/verifier.c:674:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
x86: Add default case to ssa_chg_jmp_direction()

Spotted by GCC:

  arch/x86/instruction.c: In function ‘ssa_chg_jmp_direction’:
  arch/x86/instruction.c:683:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
cafebabe: Add default case to cafebabe_annotation_free()

Spotted by GCC:

  cafebabe/annotations_attribute.c: In function ‘cafebabe_annotation_free’:
  cafebabe/annotations_attribute.c:191:3: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
cafebabe: Add default case to cafebabe_constant_pool_deinit()

Spotted by GCC:

  cafebabe/constant_pool.c: In function ‘cafebabe_constant_pool_deinit’:
  cafebabe/constant_pool.c:318:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
runtime: Add default case to get_primitive_class_name()

Spotted by GCC:

  runtime/java_lang_VMClassLoader.c: In function ‘get_primitive_class_name’:
  runtime/java_lang_VMClassLoader.c:44:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Fix unsigned int comparison in stack_trace_elem_type_name()

Spotted by GCC:

  vm/stack-trace.c: In function ‘stack_trace_elem_type_name’:
  vm/stack-trace.c:723:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
jato: Add default case to main()

Spotted by GCC:

  jato.c: In function ‘main’:
  jato.c:1213:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Fix field preload array initializers

Spotted by GCC:

  vm/preload.c:80:2: warning: missing initializer [-Wmissing-field-initializers]
  vm/preload.c:80:2: warning: (near initialization for ‘primitive_preload_entries[0].optional’) [-Wmissing-field-initializers]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Add default case to vm_object_clone()

Spotted by GCC:

  vm/object.c:303:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Fix unsigned int comparisons in vm/fault-inject.c

Spotted by GCC:

    CC       vm/fault-inject.o
  vm/fault-inject.c: In function ‘vm_fault_enabled’:
  vm/fault-inject.c:39:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  vm/fault-inject.c: In function ‘vm_fault_arg’:
  vm/fault-inject.c:47:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  vm/fault-inject.c: In function ‘native_vm_enable_fault’:
  vm/fault-inject.c:56:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  vm/fault-inject.c: In function ‘native_vm_disable_fault’:
  vm/fault-inject.c:65:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
runtime: Add default case to VMField functions

Spotted by GCC:

  runtime/java_lang_reflect_VMField.c: In function ‘to_jlong_value’:
  runtime/java_lang_reflect_VMField.c:67:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jint_value’:
  runtime/java_lang_reflect_VMField.c:95:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jshort_value’:
  runtime/java_lang_reflect_VMField.c:122:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jdouble_value’:
  runtime/java_lang_reflect_VMField.c:147:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jfloat_value’:
  runtime/java_lang_reflect_VMField.c:177:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jchar_value’:
  runtime/java_lang_reflect_VMField.c:206:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jbyte_value’:
  runtime/java_lang_reflect_VMField.c:230:2: warning: switch missing default case [-Wswitch-default]
  runtime/java_lang_reflect_VMField.c: In function ‘to_jboolean_value’:
  runtime/java_lang_reflect_VMField.c:254:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
runtime: Add default cases to vm/reflection.c

Spotted by GCC:

  runtime/reflection.c: In function ‘vm_type_to_class’:
  runtime/reflection.c:238:2: warning: switch missing default case [-Wswitch-default]
  runtime/reflection.c: In function ‘object_to_jvalue’:
  runtime/reflection.c:456:2: warning: switch missing default case [-Wswitch-default]
  runtime/reflection.c: In function ‘jvalue_to_object’:
  runtime/reflection.c:574:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>
vm: Add default case to load_class_from_classpath_file()

Spotted by GCC:

  vm/classloader.c: In function ‘load_class_from_classpath_file’:
  vm/classloader.c:375:2: warning: switch missing default case [-Wswitch-default]

Signed-off-by: Pekka Enberg <penberg@kernel.org>