[at-spi2-core: 3/6] Fix clang warning about incorrect enum type
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 3/6] Fix clang warning about incorrect enum type
- Date: Thu, 7 Jul 2022 22:29:30 +0000 (UTC)
commit 1260facb587bdc7f4d619ae7b071173a063d0612
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Jul 7 12:32:01 2022 -0500
Fix clang warning about incorrect enum type
From the asan job, which uses clang instead of gcc:
../atk-adaptor/event.c:256:25: warning: implicit conversion from
enumeration type 'AtspiKeyEventType' to different enumeration type
'AtspiEventType' [-Wenum-conversion]
Fortunately the values ATSPI_KEY_PRESSED/ATSPI_KEY_RELEASED and
ATSPI_KEY_PRESSED_EVENT/ATSPI_KEY_RELEASED_EVENT resolve to the same
integer respectively, so there was no observable bug.
atk-adaptor/event.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index f03e19b0..a3e1a060 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -253,14 +253,14 @@ spi_init_keystroke_from_atk_key_event (AtspiDeviceEvent * keystroke,
switch (event->type)
{
case (ATK_KEY_EVENT_PRESS):
- keystroke->type = ATSPI_KEY_PRESSED;
+ keystroke->type = ATSPI_KEY_PRESSED_EVENT;
break;
case (ATK_KEY_EVENT_RELEASE):
- keystroke->type = ATSPI_KEY_RELEASED;
+ keystroke->type = ATSPI_KEY_RELEASED_EVENT;
break;
default:
- keystroke->type = 0;
- break;
+ g_error ("atk passed us an AtkKeyEventStruct invalid type %d", event->type);
+ return;
}
#if 0
g_print
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]