Skip to content

Remove warnings#477

Merged
luciansmith merged 3 commits intodevelopmentfrom
remove-warnings
Mar 12, 2026
Merged

Remove warnings#477
luciansmith merged 3 commits intodevelopmentfrom
remove-warnings

Conversation

@luciansmith
Copy link
Member

  • sprintf->snprintf
  • Addresses of actual objects are never NULL
  • 'this' is never NULL
  • Add default cases for ASTNode switch statements.

* sprintf->snprintf
* Addresses of actual objects are never NULL
* 'this' is never NULL
* Add default cases for ASTNode switch statements.
I'm not sure testing calling a function on NULL is a good idea?  But it's there, I guess.
Copy link
Member

@fbergmann fbergmann left a comment

Choose a reason for hiding this comment

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

looks good to me though it seems odd, that we have different array lengths in our code base.

and i'd much rather see the use of normal stl instead, like std::to_string rather than snprintf.

and the group thing, since isSetGroup always return true, we really dont need to check for isSetGroup ever.

@luciansmith
Copy link
Member Author

Yeah, I left in the 'isSetGroup' function just in case we changed our implementation in the future. Like, perhaps we'll want to check if anything is non-default in the 'group' object, and only write things out then?

@luciansmith luciansmith merged commit d7c1324 into development Mar 12, 2026
35 checks passed
@luciansmith luciansmith deleted the remove-warnings branch March 12, 2026 17:10
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.

2 participants