Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Cast an enum class argument to int before printf-formatting it#1493

Closed
laurynas-biveinis wants to merge 1 commit into
facebook:fb-mysql-8.0.32from
laurynas-biveinis:llvm-17-fix
Closed

Cast an enum class argument to int before printf-formatting it#1493
laurynas-biveinis wants to merge 1 commit into
facebook:fb-mysql-8.0.32from
laurynas-biveinis:llvm-17-fix

Conversation

@laurynas-biveinis

Copy link
Copy Markdown
Contributor

This fixes a LLVM 17 build regression:

storage/rocksdb/rdb_bulk_load.cc:105:55: error: format specifies type 'int' but the argument has type 'Rdb_bulk_load_type' [-Werror,-Wformat]
105 | "unexpected bulk load type %d", type);
| ~~ ^~~~
| static_cast( )
include/mysql/components/services/log_builtins.h:838:66: note: expanded from macro 'LogPluginErrMsg'
838 | .message_quoted("Plugin " LOG_COMPONENT_TAG " reported", ##VA_ARGS)
| ^~~~~~~~~~~

This fixes a LLVM 17 build regression:

storage/rocksdb/rdb_bulk_load.cc:105:55: error: format specifies type 'int' but the argument has type 'Rdb_bulk_load_type' [-Werror,-Wformat]
  105 |                       "unexpected bulk load type %d", type);
      |                                                  ~~   ^~~~
      |                                                       static_cast<int>( )
include/mysql/components/services/log_builtins.h:838:66: note: expanded from macro 'LogPluginErrMsg'
  838 |       .message_quoted("Plugin " LOG_COMPONENT_TAG " reported", ##__VA_ARGS__)
      |                                                                  ^~~~~~~~~~~
@facebook-github-bot

Copy link
Copy Markdown

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot

Copy link
Copy Markdown

This pull request has been merged in 91e997c.

@laurynas-biveinis laurynas-biveinis deleted the llvm-17-fix branch October 1, 2024 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants