From: Oliver Kurth Date: Mon, 30 Sep 2019 23:24:27 +0000 (-0700) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-11.1.0~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5758ea87e637011bd05cf120fa3974f68644267f;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index aa9396fe4..3c82e0407 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -840,4 +840,15 @@ typedef int pid_t; #define END_PTR_TO_ALIGNED_VAR \ } while (0) + +/* + * -Wswitch means that when you pass switch an enum that it's looking for + * all values from that enum, and only that enum, to be accounted for. + * "default:;" is fine for catching values you don't care about. But today + * we have a bunch of code that uses internal and external enum values, or + * in other words combines two enums into a single variable. This cast is + * the workaround, but we really need to fix this mess. + */ +#define UNCHECKED_SWITCH__FIXME(x) switch ((uint64)(x)) + #endif // ifndef _VM_BASIC_DEFS_H_