Skip to content

Conversation

@eddelbuettel
Copy link
Member

Closes #1447

Corrects a format string for the unsigned int variable used

Checklist

  • Code compiles correctly
  • R CMD check still passes all tests
  • Preferably, new tests were added which fail without the change
  • Document the changes by file in ChangeLog

Copy link
Contributor

@kevinushey kevinushey left a comment

Choose a reason for hiding this comment

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

LGTM!

@eddelbuettel eddelbuettel merged commit 1d55a1f into master Jan 20, 2026
26 checks passed
@eddelbuettel eddelbuettel deleted the bugfix/issue1447 branch January 20, 2026 18:59
@Enchufa2
Copy link
Member

Enchufa2 commented Jan 21, 2026

There is a more general problem in that file, because the private attribute is an unsigned int, but then it is used elsewhere as an int, which will probably bite us in the future.

@eddelbuettel
Copy link
Member Author

Agree that it is a smell. I was probably too influenced by the POSIX data structure where I may have seen an unsigned int. It should not matter as we are 'range safe' here, the value (of fractional microseconds) cannot overflow an integer. Which also means it never needed to be an unsigned. Sigh. We could change it.

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.

-Wformat warning from include/Rcpp/date_datetime/date_datetime.h:29

4 participants