Skip to content

lib: Fix enum mismatch compile time warning

Bastien Nocera requested to merge wip/hadess/enum-fix into master
lib/bluetooth-utils.c:52:1: warning: conflicting types for ‘bluetooth_type_to_string’ due to enum/integer mismatch; have ‘const gchar *(BluetoothType)’ {aka ‘const char *(BluetoothType)’} [-Wenum-int-mismatch]
   52 | bluetooth_type_to_string (BluetoothType type)
      | ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from lib/bluetooth-utils.c:39:
lib/bluetooth-utils.h:34:16: note: previous declaration of ‘bluetooth_type_to_string’ with type ‘const gchar *(guint)’ {aka ‘const char *(unsigned int)’}
   34 | const gchar   *bluetooth_type_to_string        (guint type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~

Merge request reports