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

Fix #851, Pass aligned message into CFE_MSG_ComputeCheckSum #852

Merged

Conversation

skliper
Copy link
Contributor

@skliper skliper commented Aug 31, 2020

Describe the contribution
Fix #851 - Fixes the cast-align error (use the aligned Msg since it's available already)

Testing performed
Standard build and unit test, passes

Expected behavior changes
No more alignment error

System(s) tested on

  • Hardware: cFS Dev Server
  • OS: Ubuntu 18.04
  • Versions: bundle main + this commit

Additional context
None

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

@skliper skliper added bug CCB:FastTrack CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Aug 31, 2020
@skliper skliper added this to the 7.0.0 milestone Aug 31, 2020
@skliper
Copy link
Contributor Author

skliper commented Aug 31, 2020

@hukuzatuna - Could you check if this resolves #851?

@skliper
Copy link
Contributor Author

skliper commented Aug 31, 2020

@hukuzatuna - standby, now I remember why I did that (to avoid the cppcheck warning). Let me fix both first.

@hukuzatuna
Copy link

Standing by. (It fixed the first error, but now it throws the same error on SendUdp.c under the cFS-GroundSystem directory. I assume your fix will address all of them, so continuing to stand by.)

@skliper skliper force-pushed the fix851-cast-align-checksum branch from 0ba4bb6 to 2799d07 Compare August 31, 2020 20:56
@hukuzatuna
Copy link

Fixed in cfe_msg_sechdr_checksum.c, but now throwing the same error in SendUdp under the cFS-GroundSystem directory:

Scanning dependencies of target cmdUtil
[ 14%] Building C object tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/cmdUtil.c.o
[ 28%] Building C object tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/SendUdp.c.o
/home/pi/src/NASA/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/SendUdp.c: In function ‘SendUdp’:
/home/pi/src/NASA/cFS/tools/cFS-GroundSystem/Subsystems/cmdUtil/SendUdp.c:94:23: error: cast increases required alignment of target type [-Werror=cast-align]
            inet_ntoa(((struct sockaddr_in *)result->ai_addr)->sin_addr), port);
                       ^
cc1: all warnings being treated as errors
make[7]: *** [tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/build.make:76: tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/SendUdp.c.o] Error 1
make[6]: *** [CMakeFiles/Makefile2:468: tools/cFS-GroundSystem/Subsystems/cmdUtil/CMakeFiles/cmdUtil.dir/all] Error 2
make[5]: *** [Makefile:141: all] Error 2
make[4]: *** [CMakeFiles/mission-all.dir/build.make:57: CMakeFiles/mission-all] Error 2
make[3]: *** [CMakeFiles/Makefile2:170: CMakeFiles/mission-all.dir/all] Error 2
make[2]: *** [CMakeFiles/Makefile2:177: CMakeFiles/mission-all.dir/rule] Error 2
make[1]: *** [Makefile:214: mission-all] Error 2
make: *** [Makefile:120: all] Error 2
pi@renegade:~/src/NASA/cFS $ 

Should I open another issue, or just track this category here?

@skliper
Copy link
Contributor Author

skliper commented Aug 31, 2020

I was able to bring up a system with a new enough gcc to do cast-align=strict. I'll write issues if they don't exist already.

@astrogeco astrogeco added CCB-20200902 and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Sep 2, 2020
@astrogeco astrogeco self-requested a review September 2, 2020 13:51
@astrogeco astrogeco requested a review from jphickey September 2, 2020 13:51
@astrogeco
Copy link
Contributor

CCB 2020-09-02 APPROVED

@yammajamma yammajamma changed the base branch from main to integration-candidate September 2, 2020 19:04
@yammajamma yammajamma added CCB:Approved Indicates code review and approval by community CCB IC-20200902 labels Sep 2, 2020
@yammajamma yammajamma merged commit 64f0da9 into nasa:integration-candidate Sep 2, 2020
@skliper skliper deleted the fix851-cast-align-checksum branch February 1, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CCB:Approved Indicates code review and approval by community CCB CCB:FastTrack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPi4 make process throws alignment error
5 participants