Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • libhandy libhandy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 131
    • Issues 131
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Librem5
  • libhandylibhandy
  • Merge requests
  • !320

Fix some warnings on gcc arm

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged louib requested to merge louib/libhandy:fix_arm_warnings into master Oct 23, 2019
  • Overview 3
  • Commits 1
  • Pipelines 3
  • Changes 5

I was getting the following warnings when compiling the library on a RPi:

[23/99] Compiling C object 'src/25a6634@@handy-0.0@sha/hdy-dialer.c.o'.
../src/hdy-dialer.c: In function ‘key_press_event_cb’:
../src/hdy-dialer.c:192:25: warning: cast increases required alignment of target type [-Wcast-align]
   gdk_event_get_keyval ((GdkEvent *) event, &keyval);
                         ^
[31/99] Compiling C object 'src/25a6634@@handy-0.0@sha/hdy-paginator-box.c.o'.
../src/hdy-paginator-box.c: In function ‘hdy_paginator_box_finalize’:
../src/hdy-paginator-box.c:319:27: warning: cast increases required alignment of target type [-Wcast-align]
   HdyPaginatorBox *self = (HdyPaginatorBox *)object;
                           ^
[38/99] Compiling C object 'src/25a6634@@handy-0.0@sha/hdy-preferences-window.c.o'.
../src/hdy-preferences-window.c: In function ‘key_pressed’:
../src/hdy-preferences-window.c:197:25: warning: cast increases required alignment of target type [-Wcast-align]
   gdk_event_get_keyval ((GdkEvent *) event, &keyval);
                         ^
../src/hdy-preferences-window.c:198:24: warning: cast increases required alignment of target type [-Wcast-align]
   gdk_event_get_state ((GdkEvent *) event, &state);
                        ^
[43/99] Compiling C object 'src/25a6634@@handy-0.0@sha/hdy-swipe-tracker.c.o'.
../src/hdy-swipe-tracker.c: In function ‘hdy_swipe_tracker_constructed’:
../src/hdy-swipe-tracker.c:465:27: warning: cast increases required alignment of target type [-Wcast-align]
   HdySwipeTracker *self = (HdySwipeTracker *)object;
                           ^
../src/hdy-swipe-tracker.c: In function ‘hdy_swipe_tracker_dispose’:
../src/hdy-swipe-tracker.c:492:27: warning: cast increases required alignment of target type [-Wcast-align]
   HdySwipeTracker *self = (HdySwipeTracker *)object;
                           ^
[50/99] Compiling C object 'examples/c590b3c@@handy-0.0-demo@exe/hdy-demo-window.c.o'.
../examples/hdy-demo-window.c: In function ‘hdy_demo_window_key_pressed_cb’:
../examples/hdy-demo-window.c:50:25: warning: cast increases required alignment of target type [-Wcast-align]
   gdk_event_get_keyval ((GdkEvent *) event, &keyval);
                         ^
../examples/hdy-demo-window.c:51:24: warning: cast increases required alignment of target type [-Wcast-align]
   gdk_event_get_state ((GdkEvent *) event, &state);
                        ^

Here's the compiler version:

Native C compiler: cc (gcc 8.3.0 "cc (Raspbian 8.3.0-6+rpi1) 8.3.0")
Build machine cpu family: arm
Build machine cpu: armv7l
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix_arm_warnings