-
Notifications
You must be signed in to change notification settings - Fork 23
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
wch
wants to merge
1
commit into
bethatkinson:master
Choose a base branch
from
wch:fix-string
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kurt Hornik sent a note today suggesting changing
error(errmsg);
to
error("%s", errmsg);
Hopefully that fixes the issue. I'll try to get this submitted tomorrow.
From: Winston Chang ***@***.***>
Sent: Thursday, November 30, 2023 4:31 PM
To: bethatkinson/rpart ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [EXTERNAL] [bethatkinson/rpart] Fix string format (PR #52)
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:
* httpuv:
* issue: rstudio/httpuv#388<rstudio/httpuv#388>
* fix: https://github.com/rstudio/httpuv/pull/389/files
* later:
* issue: r-lib/later#181<r-lib/later#181>
* fix https://github.com/r-lib/later/pull/182/files
The change in this pull request does the same thing as those other pull requests.
…________________________________
You can view, comment on, or merge this pull request online at:
#52
Commit Summary
* 997e38e<997e38e> Fix string format
File Changes
(1 file<https://github.com/bethatkinson/rpart/pull/52/files>)
* M src/rpart.c<https://github.com/bethatkinson/rpart/pull/52/files#diff-094c155360459643fa6e9239d9fcbe86f0604ca28ce2612afa267c8bf060f8f8> (2)
Patch Links:
* https://github.com/bethatkinson/rpart/pull/52.patch
* https://github.com/bethatkinson/rpart/pull/52.diff
-
Reply to this email directly, view it on GitHub<#52>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACWQG57XBSZQHP4SF2EGAXLYHECJVAVCNFSM6AAAAABAB5QZJOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTSNRRGQ4DKMY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Great, I'm glad to hear that Kurt also suggested the same fix. |
Fix should show up on cran shortly
From: Winston Chang ***@***.***>
Sent: Thursday, November 30, 2023 4:31 PM
To: bethatkinson/rpart ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [EXTERNAL] [bethatkinson/rpart] Fix string format (PR #52)
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:
* httpuv:
* issue: rstudio/httpuv#388<rstudio/httpuv#388>
* fix: https://github.com/rstudio/httpuv/pull/389/files
* later:
* issue: r-lib/later#181<r-lib/later#181>
* fix https://github.com/r-lib/later/pull/182/files
The change in this pull request does the same thing as those other pull requests.
…________________________________
You can view, comment on, or merge this pull request online at:
#52
Commit Summary
* 997e38e<997e38e> Fix string format
File Changes
(1 file<https://github.com/bethatkinson/rpart/pull/52/files>)
* M src/rpart.c<https://github.com/bethatkinson/rpart/pull/52/files#diff-094c155360459643fa6e9239d9fcbe86f0604ca28ce2612afa267c8bf060f8f8> (2)
Patch Links:
* https://github.com/bethatkinson/rpart/pull/52.patch
* https://github.com/bethatkinson/rpart/pull/52.diff
-
Reply to this email directly, view it on GitHub<#52>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACWQG57XBSZQHP4SF2EGAXLYHECJVAVCNFSM6AAAAABAB5QZJOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTSNRRGQ4DKMY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.