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

GH-38893: [R] Fix printf syntax in altrep.cpp #38894

Merged
merged 3 commits into from Nov 27, 2023

Conversation

paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Nov 27, 2023

Rationale for this change

We have CI errors and CRAN check errors on R-devel, where the appropriate attribute for printf format checking was just added.

What changes are included in this PR?

The appopriate types are now used for printf parameters.

Are these changes tested?

Covered by existing tests

Are there any user-facing changes?

No

Copy link

⚠️ GitHub issue #38893 has been automatically assigned in GitHub to PR creator.

@paleolimbot
Copy link
Member Author

The Windows error is from cpp11 (but also because we or somebody set -Werror):

D:/a/_temp/Library/cpp11/include/cpp11/protect.hpp:282:42: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'SEXP' {aka 'SEXPREC*'} [-Werror=format=]
  282 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", cell, CAR(cell), CDR(cell), TAG(cell));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
D:/a/_temp/Library/cpp11/include/cpp11/protect.hpp:282:42: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'SEXP' {aka 'SEXPREC*'} [-Werror=format=]
  282 |       REprintf("%x CAR: %x CDR: %x TAG: %x\n", cell, CAR(cell), CDR(cell), TAG(cell));
      |                                         ~^                                 ~~~~~~~~~
      |                                          |                                    |
      |                                          unsigned int                         SEXP {aka SEXPREC*}
cc1plus.exe: all warnings being treated as errors

@assignUser
Copy link
Member

The Windows error is from cpp11

It looks like we are using most recent cpp11 and that doesn't show this issue on r devel, are we not vendoring the newest headers or something?

Copy link
Member

@assignUser assignUser left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! I am going to merge this as the windows issue is not really related to this issue

@assignUser assignUser merged commit 9cece9d into apache:main Nov 27, 2023
10 of 11 checks passed
@assignUser assignUser removed the awaiting committer review Awaiting committer review label Nov 27, 2023
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 9cece9d.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

@paleolimbot paleolimbot deleted the r-fix-format-altrep branch November 28, 2023 13:34
raulcd pushed a commit that referenced this pull request Nov 28, 2023
### Rationale for this change

We have CI errors and CRAN check errors on R-devel, where the appropriate attribute for printf format checking was just added.

### What changes are included in this PR?

The appopriate types are now used for printf parameters.

### Are these changes tested?

Covered by existing tests

### Are there any user-facing changes?

No
* Closes: #38893

Authored-by: Dewey Dunnington <dewey@voltrondata.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
assignUser pushed a commit to assignUser/arrow that referenced this pull request Dec 1, 2023
### Rationale for this change

We have CI errors and CRAN check errors on R-devel, where the appropriate attribute for printf format checking was just added.

### What changes are included in this PR?

The appopriate types are now used for printf parameters.

### Are these changes tested?

Covered by existing tests

### Are there any user-facing changes?

No
* Closes: apache#38893

Authored-by: Dewey Dunnington <dewey@voltrondata.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
### Rationale for this change

We have CI errors and CRAN check errors on R-devel, where the appropriate attribute for printf format checking was just added.

### What changes are included in this PR?

The appopriate types are now used for printf parameters.

### Are these changes tested?

Covered by existing tests

### Are there any user-facing changes?

No
* Closes: apache#38893

Authored-by: Dewey Dunnington <dewey@voltrondata.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[R] altrep.cpp contains errors in printf syntax
2 participants