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 build warnings and unit test improvements #74

Merged
merged 1 commit into from
Sep 25, 2020

Conversation

muneebahmed10
Copy link
Contributor

@muneebahmed10 muneebahmed10 commented Sep 24, 2020

Description:
Several calls to expectProcessLoopCalls in core_mqtt_utest.c used the MQTTStateNull enum instead of MQTTSuccess, and resulted in compiler warnings from llvm:

 ◌ libraries/standard/coreMQTT/test/unit-test/core_mqtt_utest.c:
     1693:39  	clang       	warning   	Implicit conversion from enumeration type 'enum MQTTPublishState' to different enumeration type 'MQTTStatus_t' (aka 'enum MQTTStatus')
     1704:39  	clang       	warning   	Implicit conversion from enumeration type 'enum MQTTPublishState' to different enumeration type 'MQTTStatus_t' (aka 'enum MQTTStatus')
     1715:39  	clang       	warning   	Implicit conversion from enumeration type 'enum MQTTPublishState' to different enumeration type 'MQTTStatus_t' (aka 'enum MQTTStatus')
     1725:39  	clang       	warning   	Implicit conversion from enumeration type 'enum MQTTPublishState' to different enumeration type 'MQTTStatus_t' (aka 'enum MQTTStatus')
     1754:39  	clang       	warning   	Implicit conversion from enumeration type 'enum MQTTPublishState' to different enumeration type 'MQTTStatus_t' (aka 'enum MQTTStatus')

Since expectProcessLoopCalls has many parameters, it's not obvious from looking at it in each call what each parameter is doing, and whether it's actually necessary. This introduces a structure to hold expectProcessLoopCalls' parameters, and only the parameters that are actually used will have to be changed in each invocation.

@muneebahmed10 muneebahmed10 merged commit 788a64a into FreeRTOS:master Sep 25, 2020
@muneebahmed10 muneebahmed10 deleted the fix-warnings branch September 25, 2020 17:37
muneebahmed10 added a commit that referenced this pull request Oct 28, 2020
* Fix typo from #74

* Move error test to happy path due to #83
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.

None yet

3 participants