Searched hist:"0 e74eb86eaf3ef57e9f9741cb668784c96e654ff" (Results 1 – 2 of 2) sorted by relevance
/openbmc/qemu/ui/ |
H A D | vnc.h | diff 0e74eb86eaf3ef57e9f9741cb668784c96e654ff Thu Dec 07 07:45:01 CST 2023 Daniel P. Berrangé <berrange@redhat.com> ui: drop VNC feature _MASK constants
Each VNC feature enum entry has a corresponding _MASK constant which is the bit-shifted value. It is very easy for contributors to accidentally use the _MASK constant, instead of the non-_MASK constant, or the reverse. No compiler warning is possible and it'll just silently do the wrong thing at runtime.
By introducing the vnc_set_feature helper method, we can drop all the _MASK constants and thus prevent any future accidents.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
H A D | vnc.c | diff 0e74eb86eaf3ef57e9f9741cb668784c96e654ff Thu Dec 07 07:45:01 CST 2023 Daniel P. Berrangé <berrange@redhat.com> ui: drop VNC feature _MASK constants
Each VNC feature enum entry has a corresponding _MASK constant which is the bit-shifted value. It is very easy for contributors to accidentally use the _MASK constant, instead of the non-_MASK constant, or the reverse. No compiler warning is possible and it'll just silently do the wrong thing at runtime.
By introducing the vnc_set_feature helper method, we can drop all the _MASK constants and thus prevent any future accidents.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|