g2: fix gpointer cast complaints 96/40696/2
authorFlorin Coras <fcoras@cisco.com>
Thu, 11 Apr 2024 01:31:57 +0000 (18:31 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 11 Apr 2024 01:07:59 +0000 (01:07 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iadd6a4dd928002e764fc52343c14403620279aa7

src/tools/g2/pointsel.c
src/tools/g2/view1.c

index 5982237..fae9336 100644 (file)
@@ -169,7 +169,7 @@ static void down_button(void)
 static void button_click_callback(GtkButton *item, gpointer data)
 {
     int i;
-    enum button_click click = (enum button_click)data;
+    enum button_click click = (enum button_click) (long int) data;
 
     switch (click) {
     case ALL_BUTTON:
index 3902c0a..7a6ae71 100644 (file)
@@ -2329,21 +2329,22 @@ out:
 
 static void view1_button_click_callback(GtkButton *item, gpointer data)
 {
-    enum view1_button_click click = (enum view1_button_click) data;
-    event_t *ep;
-    ulonglong event_incdec;
-    ulonglong current_width;
-    ulonglong zoom_delta;
+  enum view1_button_click click = (enum view1_button_click) (long int) data;
+  event_t *ep;
+  ulonglong event_incdec;
+  ulonglong current_width;
+  ulonglong zoom_delta;
 
-    current_width = s_v1->maxvistime - s_v1->minvistime;
-    event_incdec = (current_width) / 3;
+  current_width = s_v1->maxvistime - s_v1->minvistime;
+  event_incdec = (current_width) / 3;
 
-    if (event_incdec == 0LL)
-        event_incdec = 1;
+  if (event_incdec == 0LL)
+    event_incdec = 1;
 
-    zoom_delta = (s_v1->maxvistime - s_v1->minvistime) / 6;
+  zoom_delta = (s_v1->maxvistime - s_v1->minvistime) / 6;
 
-    switch(click) {
+  switch (click)
+    {
     case TOP_BUTTON:
         /* First PID to top of window */
         s_v1->first_pid_index = 0;