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

Fix string format #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix string format #52

wants to merge 1 commit into from

Conversation

wch
Copy link

@wch wch commented Nov 30, 2023

With R-devel, as of r85619 (r-devel/r-svn@f374bbf0), on my build machines I started getting failures when building rpart, because that commit added some string safety checks.

rpart.c: In function 'rpart':
rpart.c:203:9: error: format not a string literal and no format
arguments [-Werror=format-security]
  203 |         error(errmsg);
      |         ^~~~~

My understanding is that on most machines, this particular line of code raises a warning, but on mine it is an error. I'm not sure exactly why this is, but it seems like a good idea to address this anyway -- it is similar to a fix we recently had to do for a number of packages that CRAN sent emails about. For example:

The change in this pull request does the same thing as those other pull requests.

@bethatkinson
Copy link
Owner

bethatkinson commented Nov 30, 2023 via email

@wch
Copy link
Author

wch commented Dec 2, 2023

Great, I'm glad to hear that Kurt also suggested the same fix.

@bethatkinson
Copy link
Owner

bethatkinson commented Dec 5, 2023 via email

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.

None yet

2 participants