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

Minimized warnings during compilation #1205

Merged
merged 3 commits into from
Oct 16, 2020
Merged

Minimized warnings during compilation #1205

merged 3 commits into from
Oct 16, 2020

Conversation

yitam
Copy link
Contributor

@yitam yitam commented Oct 16, 2020

To deal with this warning in Mac:
warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start( print_params, warning );,

change bool warning to int warning.

Concerning va_list and the ellipsis, the rightmost argument and all unnamed ones are subjects for default argument promotion. If a real argument’s type is char, short (with or without a sign) or float (in the above case, a bool), the corresponding parameter must be treated as int, int (with or without a sign) or double.

Otherwise – undefined behavior [C11 7.16.1.1./2].

@yitam yitam merged commit 537ae2d into microsoft:dev Oct 16, 2020
@yitam yitam deleted the warnings branch October 16, 2020 22:18
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.

1 participant