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 string compare macros #106

Closed
wants to merge 2 commits into from
Closed

Fix string compare macros #106

wants to merge 2 commits into from

Conversation

XUJINKAI
Copy link
Contributor

NULL pointer in strcmp causes Segmentation fault

NULL pointer in strcmp causes Segmentation fault
@sheredom
Copy link
Owner

I think the fails are because you should useUTEST_NULL instead of NULL.

@sheredom
Copy link
Owner

sheredom commented Aug 2, 2022

Gurgh - Windows is complaining with:

warning C4130: '==' : logical operation on address of string constant

I think if you added that warning to UTEST_SURPRESS_WARNING_BEGIN here https://github.com/sheredom/utest.h/blob/master/utest.h#L506 that should be fixed.

Could you also add two tests, one for x being null, the other y being null?

@sheredom
Copy link
Owner

sheredom commented Aug 2, 2022

Oh actually, can you add tests, since they'd need to fail. Lemme think on that bit!

@sheredom sheredom mentioned this pull request Sep 1, 2022
@sheredom
Copy link
Owner

sheredom commented Sep 1, 2022

Closing in favour of #110

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

2 participants