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

Fixing printf modifiers #176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fixing printf modifiers #176

wants to merge 2 commits into from

Conversation

Zacharyprime
Copy link
Member

This produces warning(s)

The $ is a valid "operator" for printf, so I dug around to make sure this wasn't intentional, maybe there is some C++ trickery I hadn't seen before. I couldn't find any reference that uses $ this way.

I also noticed after the fact that in the same file the identical expression exists but with % as I would have expected, so I'm certain it's a typo.

@Zacharyprime Zacharyprime changed the title Fixing typo in camera.cpp Fixing printf modifiers Sep 19, 2022
@Zacharyprime
Copy link
Member Author

For the second printf fix:
%d is not the correct printf modifier for size_t
%zu and %zd are the valid ones to use in this case.

%zu is the one that is recommended for size_t

@Zacharyprime Zacharyprime linked an issue Nov 4, 2022 that may be closed by this pull request
Base automatically changed from refactor to master January 19, 2024 07:25
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.

Fix all compilation warnings
1 participant