[Chore](build) enable -Wextra and remove some -Wno (#15760)

enable -Wextra and remove some -Wno
This commit is contained in:
Pxl
2023-01-15 10:40:35 +08:00
committed by GitHub
parent fd0c352144
commit b727033906
28 changed files with 60 additions and 75 deletions

View File

@ -235,9 +235,6 @@ bool ForDecoder<T>::init() {
_last_frame_size = _max_frame_size - (_max_frame_size * _frame_count - _values_num);
size_t bit_width_offset = _buffer_len - 5 - _frame_count * 2;
if (bit_width_offset < 0) {
return false;
}
// read _storage_formats, bit_widths and compute frame_offsets
u_int32_t frame_start_offset = 0;
@ -398,7 +395,7 @@ bool ForDecoder<T>::get_batch(T* val, size_t count) {
template <typename T>
bool ForDecoder<T>::skip(int32_t skip_num) {
if (_current_index + skip_num >= _values_num || _current_index + skip_num < 0) {
if (_current_index + skip_num >= _values_num) {
return false;
}
_current_index = _current_index + skip_num;