Skip to content

Conversation

@chipbarnaby
Copy link
Contributor

@chipbarnaby chipbarnaby commented Dec 31, 2023

Description

Compilation with clang in Visual Studio produces numerous warnings.

This PR contains miscellaneous "harmless" changes that satisfy both VC and clang.

Changes include

  • More careful attention to const-ness (especially const char *)
  • Addition of inner { } in multi-level array initialization
  • Hiding unused function args
  • Conversion of some SIs to ints
  • Use of more rigorous casts (e.g. replace stuff like (char *)rc )
  • Member initialization in order of definition
  • Addition of MSGORHANDLE, eliminating need for many (const char *) casts in messaging function calls
  • Eliminate unneeded (INT) and (char *) casts in printf-style arg lists
  • Add { } in potentially ambiguous situations (e.g. if ( xxx) if (yyy)).
  • Add parens in compound logical expressions that relied on operator precedence (a || b && c -> a || (b && c) )

No behavior changes. No results changes. No documentation changes.

The PR should be immediately mergeable without impact. Perhaps some conflicts due to parallel development.

@chipbarnaby chipbarnaby marked this pull request as draft January 3, 2024 15:53
@chipbarnaby chipbarnaby marked this pull request as ready for review February 15, 2024 22:20
@nealkruis nealkruis merged commit 426ec48 into main Feb 15, 2024
@nealkruis nealkruis deleted the clang-fix branch February 15, 2024 22:49
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.

3 participants