Skip to content

Conversation

gladk
Copy link

@gladk gladk commented Oct 15, 2024

These changes are letting the project be compiled with the current Debian Testing, where Clang-16 and GCC-14.2 are default versions.

gladk added 3 commits October 15, 2024 21:33
third_party/fmt/include/fmt/ranges.h:215:59: error: self-comparison always evaluates to true [-Werror=tautological-compare]
  215 |                                integer_sequence<bool, (Is == Is)...>);

 Is == Is is always true. Upstream uses Is >=0 which is more meaningful to check non-negative
 index values.

 https://github.com/fmtlib/fmt/blob/cc2ba8f9ede4e5ae3262f43f3e4d07a22a9acdfc/include/fmt/ranges.h#L162
bustub/src/type/timestamp_type.cpp: In member function ‘virtual std::string bustub::TimestampType::ToString(const bustub::Value&) const’:
bustub/src/type/timestamp_type.cpp:130:29: error: ‘%02d’ directive output may be truncated writing between 2 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
  130 |   snprintf(zone, zone_len, "%02d", tz);  // NOLINT
        |                             ^~~~
bustub/src/type/timestamp_type.cpp:130:28: note: directive argument in the range [0, 2147483647]
          130 |   snprintf(zone, zone_len, "%02d", tz);  // NOLINT
                |                            ^~~~~~
bustub/src/type/timestamp_type.cpp:130:11: note: ‘snprintf’ output between 3 and 11 bytes into a destination of size 5
                  130 |   snprintf(zone, zone_len, "%02d", tz);  // NOLINT
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 this pull request may close these issues.

1 participant