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

Constant overflows for enum when building for armv7 #19

Closed
divyanshupundir opened this issue Jan 29, 2022 · 3 comments
Closed

Constant overflows for enum when building for armv7 #19

divyanshupundir opened this issue Jan 29, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@divyanshupundir
Copy link

First of all, I'd like to say that this is a really great library. Awesome work by the developers in making something that this well designed and is easy to use.

I used the dialect-import tool to generate my own dialect that uses common.xml

While building this for armv7 using:
GOOS=linux GOARCH=arm GOARM=7 go build

I got the following errors:

pkg/dialects/custom/enum_hil_sensor_updated_flags.go:41:5: constant 2147483648 overflows HIL_SENSOR_UPDATED_FLAGS
pkg/dialects/custom/enum_mav_sys_status_sensor.go:75:5: constant 2147483648 overflows MAV_SYS_STATUS_SENSOR

This is probably happening because dialect-import defines the enum constants as int over here. HIL_SENSOR_UPDATED_FLAGS are used as uint32_t in messages. This is probably creating problems for arm32 architecture.

@divyanshupundir
Copy link
Author

This can probably be fixed by changing the int to uint32

@aler9 aler9 added the bug Something isn't working label Jan 30, 2022
@aler9
Copy link
Member

aler9 commented Jan 30, 2022

Thanks, this has been fixed.

@aler9 aler9 closed this as completed Jan 30, 2022
@divyanshupundir divyanshupundir changed the title Constant overflows for wnum when building for armv7 Constant overflows for enum when building for armv7 Feb 9, 2022
@github-actions
Copy link

This issue is being locked automatically because it has been closed for more than 6 months.
Please open a new issue in case you encounter a similar problem.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants