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

compile warnings with gcc 11.2 in brotli #3232

Closed
GitMensch opened this issue May 18, 2022 · 6 comments · Fixed by #3593
Closed

compile warnings with gcc 11.2 in brotli #3232

GitMensch opened this issue May 18, 2022 · 6 comments · Fixed by #3593

Comments

@GitMensch
Copy link
Contributor

GitMensch commented May 18, 2022

[  1%] Building C object CMakeFiles/brotli.dir/third-party/brotli/dec/decode.c.o
/home/install/rr/third-party/brotli/dec/decode.c:1954:41: warning: argument 2 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Wvla-parameter]
 1954 |     size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
      |                          ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/install/rr/third-party/brotli/dec/decode.c:7:
/home/install/rr/third-party/brotli/include/brotli/decode.h:204:19: note: previously declared as a variable length array ‘const uint8_t[*decoded_size]’ {aka ‘const unsigned char[*decoded_size]’}
  204 |     const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/install/rr/third-party/brotli/dec/decode.c:1955:14: warning: argument 4 of type ‘uint8_t *’ {aka ‘unsigned char *’} declared as a pointer [-Wvla-parameter]
 1955 |     uint8_t* decoded_buffer) {
      |     ~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/install/rr/third-party/brotli/dec/decode.c:7:
/home/install/rr/third-party/brotli/include/brotli/decode.h:206:13: note: previously declared as a variable length array ‘uint8_t[encoded_size]’ {aka ‘unsigned char[encoded_size]’}
  206 |     uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[  2%] Building C object CMakeFiles/brotli.dir/third-party/brotli/enc/encode.c.o
/home/install/rr/third-party/brotli/enc/encode.c:1433:20: warning: argument 5 of type ‘const uint8_t *’ {aka ‘const unsigned char *’} declared as a pointer [-Wvla-parameter]
 1433 |     const uint8_t* input_buffer, size_t* encoded_size,
      |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /home/install/rr/third-party/brotli/enc/encode.c:9:
/home/install/rr/third-party/brotli/include/brotli/encode.h:293:19: note: previously declared as a variable length array ‘const uint8_t[*encoded_size]’ {aka ‘const unsigned char[*encoded_size]’}
  293 |     const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/install/rr/third-party/brotli/enc/encode.c:1434:14: warning: argument 7 of type ‘uint8_t *’ {aka ‘unsigned char *’} declared as a pointer [-Wvla-parameter]
 1434 |     uint8_t* encoded_buffer) {
      |     ~~~~~~~~~^~~~~~~~~~~~~~
In file included from /home/install/rr/third-party/brotli/enc/encode.c:9:
/home/install/rr/third-party/brotli/include/brotli/encode.h:295:13: note: previously declared as a variable length array ‘uint8_t[input_size]’ {aka ‘unsigned char[input_size]’}
  295 |     uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That happens on a fresh installed Ubuntu.

@rocallahan
Copy link
Collaborator

I get these. I don't think it's worth patching brotli to get rid of them.

@GitMensch
Copy link
Contributor Author

Is there an active upstream to check / ask?

@rocallahan
Copy link
Collaborator

There should be

@GitMensch
Copy link
Contributor Author

Those are fixed upstream, I'm checking for a new release, if not available I'd create a pull-request with updating it to the fixed version (which then has no release number, so would be 1.0.9.32 (which is 1.0.9, itself a re-released 1.0.8 + 32 commits).

@GitMensch
Copy link
Contributor Author

GitMensch commented Aug 28, 2023

Brotli has released version 1.1 and I'd like to come back to this.

Should this be still copied in completely (delete folder, include the unpacked version, test, commit) or isn't a git submodule preferable?
If that's preferable - should there be a copy in the rr-debugger org to be referenced or can we directly use the google git repo @ github for that

@rocallahan
Copy link
Collaborator

We want to keep copying it in the same way it is now. You can reference the Google Github commit the same way we currently do.

GitMensch added a commit to GitMensch/rr that referenced this issue Sep 5, 2023
See changelog at https://github.com/google/brotli/releases.

The main reason for this update is fixing rr-debugger#3232 (compile warnings).
Another point of interest is the faster comprssion/decompression.

This is a direct copy of the relevant directories from a pristine brotli checkout; the only manual edits are to the README.md file and the CMakeLists.txt file.
rocallahan pushed a commit that referenced this issue Sep 5, 2023
See changelog at https://github.com/google/brotli/releases.

The main reason for this update is fixing #3232 (compile warnings).
Another point of interest is the faster comprssion/decompression.

This is a direct copy of the relevant directories from a pristine brotli checkout; the only manual edits are to the README.md file and the CMakeLists.txt file.
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 a pull request may close this issue.

2 participants