Skip to content

Commit 4f9221a

Browse files
committed
MDEV-36542: remove _lint macro which is unused
Attribute noreturn functions don't need a return afterwards. aria_pack was missing the noreturn attribute on its my_end function.
1 parent 0c80ddb commit 4f9221a

File tree

12 files changed

+10
-31
lines changed

12 files changed

+10
-31
lines changed

client/mysql.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,7 @@ int main(int argc,char *argv[])
13871387
if (opt_outfile)
13881388
end_tee();
13891389
mysql_end(0);
1390-
#ifndef _lint
1391-
DBUG_RETURN(0); // Keep compiler happy
1392-
#endif
1390+
DBUG_RETURN(0);
13931391
}
13941392

13951393
sig_handler mysql_end(int sig)

include/my_dbug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifdef __cplusplus
2525
extern "C" {
2626
#endif
27-
#if !defined(DBUG_OFF) && !defined(_lint)
27+
#if !defined(DBUG_OFF)
2828

2929
struct _db_stack_frame_ {
3030
const char *func; /* function name of the previous stack frame */
@@ -210,7 +210,7 @@ extern void (*my_dbug_assert_failed)(const char *assert_expr, const char* file,
210210
#define DBUG_ASSERT(A) do { } while(0)
211211
#define IF_DBUG_ASSERT(A,B) B
212212
#endif /* DBUG_ASSERT_AS_PRINTF */
213-
#endif /* !defined(DBUG_OFF) && !defined(_lint) */
213+
#endif /* !defined(DBUG_OFF) */
214214

215215
#ifdef EXTRA_DEBUG
216216
/**

include/my_global.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ C_MODE_END
281281
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
282282
#endif
283283

284-
#if defined(_lint) && !defined(lint)
285-
#define lint
286-
#endif
287-
288284
#ifndef stdin
289285
#include <stdio.h>
290286
#endif
@@ -502,7 +498,7 @@ C_MODE_END
502498
#endif
503499

504500
/* We might be forced to turn debug off, if not turned off already */
505-
#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
501+
#if defined(FORCE_DBUG_OFF) && !defined(DBUG_OFF)
506502
# define DBUG_OFF
507503
# ifdef DBUG_ON
508504
# undef DBUG_ON
@@ -524,7 +520,7 @@ typedef int my_socket; /* File descriptor for sockets */
524520
#endif
525521
/* Type for functions that handles signals */
526522
#define sig_handler RETSIGTYPE
527-
#if defined(__GNUC__) && !defined(_lint)
523+
#if defined(__GNUC__)
528524
typedef char pchar; /* Mixed prototypes can take char */
529525
typedef char puchar; /* Mixed prototypes can take char */
530526
typedef char pbool; /* Mixed prototypes can take char */

sql/sql_class.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7699,7 +7699,7 @@ bool THD::binlog_for_noop_dml(bool transactional_table)
76997699
}
77007700

77017701

7702-
#if defined(DBUG_TRACE) && !defined(_lint)
7702+
#if defined(DBUG_TRACE)
77037703
static const char *
77047704
show_query_type(THD::enum_binlog_query_type qtype)
77057705
{
@@ -7713,7 +7713,7 @@ show_query_type(THD::enum_binlog_query_type qtype)
77137713
DBUG_ASSERT(0 <= qtype && qtype < THD::QUERY_TYPE_COUNT);
77147714
}
77157715
static char buf[64];
7716-
sprintf(buf, "UNKNOWN#%d", qtype);
7716+
snprintf(buf, sizeof(buf), "UNKNOWN#%d", qtype);
77177717
return buf;
77187718
}
77197719
#endif

sql/sql_list.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,7 @@ class I_List :private base_ilist
836836
inline void move_elements_to(I_List<T>* new_owner) {
837837
base_ilist::move_elements_to(new_owner);
838838
}
839-
#ifndef _lint
840839
friend class I_List_iterator<T>;
841-
#endif
842840
};
843841

844842

sql/sql_plist.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ class I_P_List : public C, public I
158158
typedef I_P_List<T, B, C, I> Base;
159159
typedef I_P_List_iterator<T, Base> Iterator;
160160
typedef I_P_List_iterator<const T, Base> Const_Iterator;
161-
#ifndef _lint
162161
friend class I_P_List_iterator<T, Base>;
163162
friend class I_P_List_iterator<const T, Base>;
164-
#endif
165163
};
166164

167165

storage/maria/aria_chk.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ int main(int argc, char **argv)
236236
}
237237
maria_end();
238238
my_exit(error);
239-
#ifndef _lint
240-
return 0; /* No compiler warning */
241-
#endif
242239
} /* main */
243240

244241
enum options_mc {

storage/maria/aria_pack.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,9 @@ int main(int argc, char **argv)
289289
maria_end();
290290
my_end(verbose ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
291291
exit(error ? 2 : 0);
292-
#ifndef _lint
293-
return 0; /* No compiler warning */
294-
#endif
295292
}
296293

294+
ATTRIBUTE_NORETURN
297295
static void my_exit(int error)
298296
{
299297
free_defaults(default_argv);

storage/mroonga/ha_mroonga.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static int mrn_change_encoding(grn_ctx *ctx, const CHARSET_INFO *charset)
337337
return mrn::encoding::set(ctx, charset);
338338
}
339339

340-
#if defined DBUG_TRACE && !defined(_lint)
340+
#if defined DBUG_TRACE
341341
static const char *mrn_inspect_thr_lock_type(enum thr_lock_type lock_type)
342342
{
343343
const char *inspected = "<unknown>";

storage/mroonga/mrn_mysql.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959

6060
#define MRN_DBUG_ENTER_FUNCTION() DBUG_ENTER(__FUNCTION__)
6161

62-
#if !defined(DBUG_OFF) && !defined(_lint)
62+
#if !defined(DBUG_OFF)
6363
# define MRN_DBUG_ENTER_METHOD() \
6464
char method_name[MRN_MESSAGE_BUFFER_SIZE]; \
6565
method_name[0] = '\0'; \

0 commit comments

Comments
 (0)