Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocol.h: fix GCC warning: type qualifiers ignored on cast result type #176

Merged
merged 1 commit into from
May 14, 2018

Conversation

bkueng
Copy link
Contributor

@bkueng bkueng commented May 9, 2018

GCC 8.0.1 warning/error that I got:

../../mavlink/include/mavlink/v2.0/common/./mavlink_msg_heartbeat.h: In function ‘uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t*)’:
../../mavlink/include/mavlink/v2.0/common/../protocol.h:247:91: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
 #define _MAV_RETURN_uint8_t(msg, wire_offset) (const uint8_t)_MAV_PAYLOAD(msg)[wire_offset]

Copy link
Member

@OXINARF OXINARF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is going to complain with line 276 too.

Also, should v0.9 be fixed too?

GCC 8.0.1 error:
../../mavlink/include/mavlink/v2.0/common/./mavlink_msg_heartbeat.h: In function ‘uint8_t mavlink_msg_heartbeat_get_type(const mavlink_message_t*)’:
../../mavlink/include/mavlink/v2.0/common/../protocol.h:247:91: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
 #define _MAV_RETURN_uint8_t(msg, wire_offset) (const uint8_t)_MAV_PAYLOAD(msg)[wire_offset]
@bkueng bkueng force-pushed the fix_ignored_qualifiers_for_upstream branch from 99a3269 to 443fc37 Compare May 11, 2018 05:57
@bkueng
Copy link
Contributor Author

bkueng commented May 11, 2018

I wonder if it is going to complain with line 276 too.

Interestingly it did not. But I can change it there as well if you want.

Also, should v0.9 be fixed too?

Done

@WickedShell WickedShell requested a review from tridge May 13, 2018 09:30
Copy link
Contributor

@WickedShell WickedShell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is required to allow GCC 8.1 (and my local build is broken without it)

@tridge tridge merged commit 918f6ef into ArduPilot:master May 14, 2018
@bkueng bkueng deleted the fix_ignored_qualifiers_for_upstream branch May 15, 2018 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants