@@ -1959,8 +1959,7 @@ static void usage(int version) {
19591959 my_print_variables (my_long_options);
19601960}
19611961
1962- bool get_one_option (int optid,
1963- const struct my_option *opt MY_ATTRIBUTE ((unused)),
1962+ bool get_one_option (int optid, const struct my_option *opt [[maybe_unused]],
19641963 char *argument) {
19651964 switch (optid) {
19661965 case OPT_CHARSETS_DIR:
@@ -2747,9 +2746,8 @@ static void initialize_readline(char *name) {
27472746 array of matches, or NULL if there aren't any.
27482747*/
27492748
2750- static char **new_mysql_completion (const char *text,
2751- int start MY_ATTRIBUTE ((unused)),
2752- int end MY_ATTRIBUTE((unused))) {
2749+ static char **new_mysql_completion (const char *text, int start [[maybe_unused]],
2750+ int end [[maybe_unused]]) {
27532751 if (!status.batch && !quick)
27542752#if defined(USE_NEW_EDITLINE_INTERFACE)
27552753 return rl_completion_matches (text, new_command_generator);
@@ -3115,8 +3113,8 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat,
31153113 tee_fprintf (PAGER, " %s\n " , (*cur)[num_name]);
31163114}
31173115
3118- static int com_server_help (String *buffer MY_ATTRIBUTE ((unused)) ,
3119- char *line MY_ATTRIBUTE((unused)) , char *help_arg) {
3116+ static int com_server_help (String *buffer [[maybe_unused]] ,
3117+ char *line [[maybe_unused]] , char *help_arg) {
31203118 MYSQL_ROW cur;
31213119 const char *server_cmd;
31223120 char cmd_buf[100 + 1 ];
@@ -3212,8 +3210,8 @@ static int com_server_help(String *buffer MY_ATTRIBUTE((unused)),
32123210 return error;
32133211}
32143212
3215- static int com_help (String *buffer MY_ATTRIBUTE ((unused)) ,
3216- char *line MY_ATTRIBUTE((unused)) ) {
3213+ static int com_help (String *buffer [[maybe_unused]] ,
3214+ char *line [[maybe_unused]] ) {
32173215 int i, j;
32183216 char *help_arg = strchr (line, ' ' ), buff[32 ], *end;
32193217 if (help_arg) {
@@ -3253,14 +3251,14 @@ static int com_help(String *buffer MY_ATTRIBUTE((unused)),
32533251}
32543252
32553253/* ARGSUSED */
3256- static int com_clear (String *buffer, char *line MY_ATTRIBUTE ((unused)) ) {
3254+ static int com_clear (String *buffer, char *line [[maybe_unused]] ) {
32573255 if (status.add_to_history ) fix_line (buffer);
32583256 buffer->length (0 );
32593257 return 0 ;
32603258}
32613259
32623260/* ARGSUSED */
3263- static int com_charset (String *buffer MY_ATTRIBUTE ((unused)) , char *line) {
3261+ static int com_charset (String *buffer [[maybe_unused]] , char *line) {
32643262 char buff[256 ], *param;
32653263 const CHARSET_INFO *new_cs;
32663264 strmake (buff, line, sizeof (buff) - 1 );
@@ -3287,7 +3285,7 @@ static int com_charset(String *buffer MY_ATTRIBUTE((unused)), char *line) {
32873285 1 if fatal error
32883286*/
32893287
3290- static int com_go (String *buffer, char *line MY_ATTRIBUTE ((unused)) ) {
3288+ static int com_go (String *buffer, char *line [[maybe_unused]] ) {
32913289 char buff[200 ]; /* about 110 chars used so far */
32923290 char time_buff[52 + 3 + 1 ]; /* time max + space&parens + NUL */
32933291 MYSQL_RES *result;
@@ -3966,8 +3964,8 @@ static void print_tab_data(MYSQL_RES *result) {
39663964 }
39673965}
39683966
3969- static int com_tee (String *buffer MY_ATTRIBUTE ((unused)) ,
3970- char *line MY_ATTRIBUTE((unused)) ) {
3967+ static int com_tee (String *buffer [[maybe_unused]] ,
3968+ char *line [[maybe_unused]] ) {
39713969 char file_name[FN_REFLEN], *end, *param;
39723970
39733971 while (my_isspace (charset_info, *line)) line++;
@@ -3999,8 +3997,8 @@ static int com_tee(String *buffer MY_ATTRIBUTE((unused)),
39993997 return 0 ;
40003998}
40013999
4002- static int com_notee (String *buffer MY_ATTRIBUTE ((unused)) ,
4003- char *line MY_ATTRIBUTE((unused)) ) {
4000+ static int com_notee (String *buffer [[maybe_unused]] ,
4001+ char *line [[maybe_unused]] ) {
40044002 if (opt_outfile) end_tee ();
40054003 tee_fprintf (stdout, " Outfile disabled.\n " );
40064004 return 0 ;
@@ -4011,8 +4009,8 @@ static int com_notee(String *buffer MY_ATTRIBUTE((unused)),
40114009*/
40124010
40134011#ifdef USE_POPEN
4014- static int com_pager (String *buffer MY_ATTRIBUTE ((unused)) ,
4015- char *line MY_ATTRIBUTE((unused)) ) {
4012+ static int com_pager (String *buffer [[maybe_unused]] ,
4013+ char *line [[maybe_unused]] ) {
40164014 char pager_name[FN_REFLEN], *end, *param;
40174015
40184016 if (status.batch ) return 0 ;
@@ -4046,8 +4044,8 @@ static int com_pager(String *buffer MY_ATTRIBUTE((unused)),
40464044 return 0 ;
40474045}
40484046
4049- static int com_nopager (String *buffer MY_ATTRIBUTE ((unused)) ,
4050- char *line MY_ATTRIBUTE((unused)) ) {
4047+ static int com_nopager (String *buffer [[maybe_unused]] ,
4048+ char *line [[maybe_unused]] ) {
40514049 my_stpcpy (pager, " stdout" );
40524050 opt_nopager = true ;
40534051 PAGER = stdout;
@@ -4061,7 +4059,7 @@ static int com_nopager(String *buffer MY_ATTRIBUTE((unused)),
40614059*/
40624060
40634061#ifdef USE_POPEN
4064- static int com_edit (String *buffer, char *line MY_ATTRIBUTE ((unused)) ) {
4062+ static int com_edit (String *buffer, char *line [[maybe_unused]] ) {
40654063 char filename[FN_REFLEN], buff[160 ];
40664064 int fd, tmp;
40674065 const char *editor;
@@ -4099,22 +4097,22 @@ static int com_edit(String *buffer, char *line MY_ATTRIBUTE((unused))) {
40994097
41004098/* If arg is given, exit without errors. This happens on command 'quit' */
41014099
4102- static int com_quit (String *buffer MY_ATTRIBUTE ((unused)) ,
4103- char *line MY_ATTRIBUTE((unused)) ) {
4100+ static int com_quit (String *buffer [[maybe_unused]] ,
4101+ char *line [[maybe_unused]] ) {
41044102 status.exit_status = 0 ;
41054103 return 1 ;
41064104}
41074105
4108- static int com_rehash (String *buffer MY_ATTRIBUTE ((unused)) ,
4109- char *line MY_ATTRIBUTE((unused)) ) {
4106+ static int com_rehash (String *buffer [[maybe_unused]] ,
4107+ char *line [[maybe_unused]] ) {
41104108#ifdef HAVE_READLINE
41114109 build_completion_hash (true , false );
41124110#endif
41134111 return 0 ;
41144112}
41154113
4116- static int com_shell (String *buffer MY_ATTRIBUTE ((unused)) ,
4117- char *line MY_ATTRIBUTE((unused)) ) {
4114+ static int com_shell (String *buffer [[maybe_unused]] ,
4115+ char *line [[maybe_unused]] ) {
41184116 char *shell_cmd;
41194117
41204118 /* Skip space from line begin */
@@ -4134,7 +4132,7 @@ static int com_shell(String *buffer MY_ATTRIBUTE((unused)),
41344132 return 0 ;
41354133}
41364134
4137- static int com_print (String *buffer, char *line MY_ATTRIBUTE ((unused)) ) {
4135+ static int com_print (String *buffer, char *line [[maybe_unused]] ) {
41384136 tee_puts (" --------------" , stdout);
41394137 (void )tee_fputs (buffer->c_ptr (), stdout);
41404138 if (!buffer->length () || (*buffer)[buffer->length () - 1 ] != ' \n ' )
@@ -4190,7 +4188,7 @@ static int com_connect(String *buffer, char *line) {
41904188 return error;
41914189}
41924190
4193- static int com_source (String *buffer MY_ATTRIBUTE ((unused)) , char *line) {
4191+ static int com_source (String *buffer [[maybe_unused]] , char *line) {
41944192 char source_name[FN_REFLEN], *end, *param;
41954193 LINE_BUFFER *line_buff;
41964194 int error;
@@ -4236,7 +4234,7 @@ static int com_source(String *buffer MY_ATTRIBUTE((unused)), char *line) {
42364234}
42374235
42384236/* ARGSUSED */
4239- static int com_delimiter (String *buffer MY_ATTRIBUTE ((unused)) , char *line) {
4237+ static int com_delimiter (String *buffer [[maybe_unused]] , char *line) {
42404238 char buff[256 ], *tmp;
42414239
42424240 strmake (buff, line, sizeof (buff) - 1 );
@@ -4259,7 +4257,7 @@ static int com_delimiter(String *buffer MY_ATTRIBUTE((unused)), char *line) {
42594257}
42604258
42614259/* ARGSUSED */
4262- static int com_use (String *buffer MY_ATTRIBUTE ((unused)) , char *line) {
4260+ static int com_use (String *buffer [[maybe_unused]] , char *line) {
42634261 char *tmp, buff[FN_REFLEN + 1 ];
42644262 int select_db;
42654263 uint warnings;
@@ -4386,22 +4384,21 @@ static int normalize_dbname(const char *line, char *buff, uint buff_size) {
43864384 return 0 ;
43874385}
43884386
4389- static int com_warnings (String *buffer MY_ATTRIBUTE ((unused)) ,
4390- char *line MY_ATTRIBUTE((unused)) ) {
4387+ static int com_warnings (String *buffer [[maybe_unused]] ,
4388+ char *line [[maybe_unused]] ) {
43914389 show_warnings = true ;
43924390 put_info (" Show warnings enabled." , INFO_INFO);
43934391 return 0 ;
43944392}
43954393
4396- static int com_nowarnings (String *buffer MY_ATTRIBUTE ((unused)) ,
4397- char *line MY_ATTRIBUTE((unused)) ) {
4394+ static int com_nowarnings (String *buffer [[maybe_unused]] ,
4395+ char *line [[maybe_unused]] ) {
43984396 show_warnings = false ;
43994397 put_info (" Show warnings disabled." , INFO_INFO);
44004398 return 0 ;
44014399}
44024400
4403- static int com_query_attributes (String *buffer MY_ATTRIBUTE ((unused)),
4404- char *line) {
4401+ static int com_query_attributes (String *buffer [[maybe_unused]], char *line) {
44054402 char buff[1024 ], *param, name[1024 ];
44064403 memset (buff, 0 , sizeof (buff));
44074404 strmake (buff, line, sizeof (buff) - 1 );
@@ -4728,8 +4725,8 @@ static int sql_connect(char *host, char *database, char *user, char *password,
47284725 }
47294726}
47304727
4731- static int com_status (String *buffer MY_ATTRIBUTE ((unused)) ,
4732- char *line MY_ATTRIBUTE((unused)) ) {
4728+ static int com_status (String *buffer [[maybe_unused]] ,
4729+ char *line [[maybe_unused]] ) {
47334730 const char *status_str;
47344731 char buff[40 ];
47354732 ulonglong id;
@@ -5317,7 +5314,7 @@ static void get_current_os_sudouser() {
53175314 return ;
53185315}
53195316
5320- static int com_prompt (String *buffer MY_ATTRIBUTE ((unused)) , char *line) {
5317+ static int com_prompt (String *buffer [[maybe_unused]] , char *line) {
53215318 char *ptr = strchr (line, ' ' );
53225319 prompt_counter = 0 ;
53235320 my_free (current_prompt);
@@ -5330,8 +5327,8 @@ static int com_prompt(String *buffer MY_ATTRIBUTE((unused)), char *line) {
53305327 return 0 ;
53315328}
53325329
5333- static int com_resetconnection (String *buffer MY_ATTRIBUTE ((unused)) ,
5334- char *line MY_ATTRIBUTE((unused)) ) {
5330+ static int com_resetconnection (String *buffer [[maybe_unused]] ,
5331+ char *line [[maybe_unused]] ) {
53355332 int error;
53365333 global_attrs->clear (connected ? &mysql : nullptr );
53375334 error = mysql_reset_connection (&mysql);
0 commit comments