-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[C++] unused-variable warnings #39387
Comments
Would you think we can enable more compile options like |
It is enabled. This is only an issue on non-debug builds because the variable is only used for an assert. |
felipecrv
pushed a commit
that referenced
this issue
Jan 2, 2024
### Rationale for this change Fix compile warning: ```bash In file included from /workspace/arrow/cpp/src/arrow/array/array_base.h:26: /workspace/arrow/cpp/src/arrow/array/data.h:452:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ /workspace/arrow/cpp/src/arrow/array/data.h:467:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ 2 warnings generated. ``` ### What changes are included in this PR? ### Are these changes tested? ### Are there any user-facing changes? * Closes: #39387 Authored-by: shibei <shibei.lh@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
clayburn
pushed a commit
to clayburn/arrow
that referenced
this issue
Jan 23, 2024
### Rationale for this change Fix compile warning: ```bash In file included from /workspace/arrow/cpp/src/arrow/array/array_base.h:26: /workspace/arrow/cpp/src/arrow/array/data.h:452:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ /workspace/arrow/cpp/src/arrow/array/data.h:467:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ 2 warnings generated. ``` ### What changes are included in this PR? ### Are these changes tested? ### Are there any user-facing changes? * Closes: apache#39387 Authored-by: shibei <shibei.lh@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this issue
Feb 19, 2024
### Rationale for this change Fix compile warning: ```bash In file included from /workspace/arrow/cpp/src/arrow/array/array_base.h:26: /workspace/arrow/cpp/src/arrow/array/data.h:452:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ /workspace/arrow/cpp/src/arrow/array/data.h:467:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ 2 warnings generated. ``` ### What changes are included in this PR? ### Are these changes tested? ### Are there any user-facing changes? * Closes: apache#39387 Authored-by: shibei <shibei.lh@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
zanmato1984
pushed a commit
to zanmato1984/arrow
that referenced
this issue
Feb 28, 2024
### Rationale for this change Fix compile warning: ```bash In file included from /workspace/arrow/cpp/src/arrow/array/array_base.h:26: /workspace/arrow/cpp/src/arrow/array/data.h:452:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ /workspace/arrow/cpp/src/arrow/array/data.h:467:19: warning: unused variable 'buffer_length' [-Wunused-variable] const int64_t buffer_length = buffers[i].size / static_cast<int64_t>(sizeof(T)); ^ 2 warnings generated. ``` ### What changes are included in this PR? ### Are these changes tested? ### Are there any user-facing changes? * Closes: apache#39387 Authored-by: shibei <shibei.lh@gmail.com> Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug, including details regarding any error messages, version, and platform.
Component(s)
C++
The text was updated successfully, but these errors were encountered: