-
Notifications
You must be signed in to change notification settings - Fork 12
Address several warnings emitted during compilation #41
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -397,7 +397,9 @@ Span Table::decodeSpan(const std::vector<std::string>& columns) { | |
| // Do the decoding | ||
|
|
||
| std::vector<size_t> lastDecoded(ncols, 0); | ||
| double decodeBuffer[maxDoublesDecode]; | ||
|
|
||
| std::vector<double> decodeBufferVec(maxDoublesDecode); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really a change we want to make. This shifts having the decode buffer from being on the stack to in the heap. |
||
| auto decodeBuffer = decodeBufferVec.data(); | ||
|
|
||
| for (size_t rowCount = 0; rowCount < nrows; ++rowCount) { | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,24 +69,24 @@ void create_scratch_data(size_t nrows, char data0[][8], int64_t data1[], char da | |
| long integer_pool[] = {1234, 4321, Settings::integerMissingValue()}; | ||
| int integer_pool_size = sizeof(integer_pool) / sizeof(integer_pool[0]); | ||
|
|
||
| long missing_integers[nrows]; | ||
| cycle_longs(missing_integers, nrows, integer_pool, integer_pool_size); | ||
| std::vector<long> missing_integers(nrows); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No particular objection to this, but is there a reason to make this change? |
||
| cycle_longs(missing_integers.data(), nrows, integer_pool, integer_pool_size); | ||
|
|
||
| // Prepare the list of double values, including the missing value | ||
|
|
||
| double double_pool[] = {12.34, 43.21, Settings::doubleMissingValue()}; | ||
| int double_pool_size = sizeof(double_pool) / sizeof(double_pool[0]); | ||
|
|
||
| double missing_doubles[nrows]; | ||
| cycle_doubles(missing_doubles, nrows, double_pool, double_pool_size); | ||
| std::vector<double> missing_doubles(nrows); | ||
| cycle_doubles(missing_doubles.data(), nrows, double_pool, double_pool_size); | ||
|
|
||
| // Prepare the list of bitfield values | ||
|
|
||
| long bitfield_pool[] = {Ob00000001, Ob00001011, Ob01101011}; | ||
| int bitfield_pool_size = sizeof(bitfield_pool) / sizeof(bitfield_pool[0]); | ||
|
|
||
| long bitfield_values[nrows]; | ||
| cycle_longs(bitfield_values, nrows, bitfield_pool, bitfield_pool_size); | ||
| std::vector<long> bitfield_values(nrows); | ||
| cycle_longs(bitfield_values.data(), nrows, bitfield_pool, bitfield_pool_size); | ||
|
|
||
| // Fill in the passed data arrays with scratch values | ||
| for (size_t i = 0; i < nrows; i++) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definitely requires a bump to the minimum version of eckit, in the CMakeLists.txt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes good catch!