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

Address two compiler warnings #15

Merged
merged 2 commits into from
Feb 19, 2023
Merged

Address two compiler warnings #15

merged 2 commits into from
Feb 19, 2023

Conversation

hartwork
Copy link
Collaborator

@hartwork hartwork commented Feb 14, 2023

Should be merged before pull request #16

@hartwork hartwork added the enhancement New feature or request label Feb 14, 2023
@hartwork hartwork added this to the 4.30 milestone Feb 14, 2023
@hartwork hartwork mentioned this pull request Feb 14, 2023
Copy link
Owner

@geissomatik geissomatik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just change this to:

sprintf(buf, " guid = %p", (void*)(&g_DDrawDeviceGUID));

@hartwork
Copy link
Collaborator Author

hartwork commented Feb 19, 2023

@geissomatik I only shied away from %p because it adds 0x to the output which would have been a semantic change. Alright, let me put %p in then (and simplify as suggested) 👍

> main.cpp(3561): warning C4715: 'WinMain': not all control paths return a value [[..]\geiss_scr.vcxproj]
.. and simplified related debug output as suggested.

> [..]\main.cpp(5830,18): warning C4477: 'sprintf' : format string '%08x' requires an argument of type 'unsigned int', but variadic argument 1 has type 'DWORD *' [[..]\vis_geis.vcxproj]
> [..]\main.cpp(5830,18): warning C4477: 'sprintf' : format string '%08x' requires an argument of type 'unsigned int', but variadic argument 2 has type 'DWORD *' [[..]\vis_geis.vcxproj]
@hartwork hartwork merged commit 482cbc8 into main Feb 19, 2023
@hartwork hartwork deleted the address-compiler-warnings branch February 23, 2023 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants