diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-01 08:27:39 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-07 19:07:27 +0200 |
commit | 89d80c1b0be94639d0913dee7b6a284c32787b09 (patch) | |
tree | a08340d45a09b067df4490259f68b5a3f9d2fa03 /dbug | |
parent | d2f5e624223fe502ddf4c6f42062c29edb988627 (diff) | |
download | mariadb-git-89d80c1b0be94639d0913dee7b6a284c32787b09.tar.gz |
Fix many -Wconversion warnings.
Define my_thread_id as an unsigned type, to avoid mismatch with
ulonglong. Change some parameters to this type.
Use size_t in a few more places.
Declare many flag constants as unsigned to avoid sign mismatch
when shifting bits or applying the unary ~ operator.
When applying the unary ~ operator to enum constants, explictly
cast the result to an unsigned type, because enum constants can
be treated as signed.
In InnoDB, change the source code line number parameters from
ulint to unsigned type. Also, make some InnoDB functions return
a narrower type (unsigned or uint32_t instead of ulint;
bool instead of ibool).
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c index 048e4803b1a..f51525897e2 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -115,18 +115,18 @@ * (until we add flags to _db_stack_frame_, increasing it by 4 bytes) */ -#define DEBUG_ON (1 << 1) /* Debug enabled */ -#define FILE_ON (1 << 2) /* File name print enabled */ -#define LINE_ON (1 << 3) /* Line number print enabled */ -#define DEPTH_ON (1 << 4) /* Function nest level print enabled */ -#define PROCESS_ON (1 << 5) /* Process name print enabled */ -#define NUMBER_ON (1 << 6) /* Number each line of output */ -#define PID_ON (1 << 8) /* Identify each line with process id */ -#define TIMESTAMP_ON (1 << 9) /* timestamp every line of output */ -#define FLUSH_ON_WRITE (1 << 10) /* Flush on every write */ -#define OPEN_APPEND (1 << 11) /* Open for append */ -#define SANITY_CHECK_ON (1 << 12) /* Check memory on every DBUG_ENTER/RETURN */ -#define TRACE_ON ((uint)1 << 31) /* Trace enabled. MUST be the highest bit!*/ +#define DEBUG_ON (1U << 1) /* Debug enabled */ +#define FILE_ON (1U << 2) /* File name print enabled */ +#define LINE_ON (1U << 3) /* Line number print enabled */ +#define DEPTH_ON (1U << 4) /* Function nest level print enabled */ +#define PROCESS_ON (1U << 5) /* Process name print enabled */ +#define NUMBER_ON (1U << 6) /* Number each line of output */ +#define PID_ON (1U << 8) /* Identify each line with process id */ +#define TIMESTAMP_ON (1U << 9) /* timestamp every line of output */ +#define FLUSH_ON_WRITE (1U << 10) /* Flush on every write */ +#define OPEN_APPEND (1U << 11) /* Open for append */ +#define SANITY_CHECK_ON (1U << 12) /* Check memory on every DBUG_ENTER/RETURN */ +#define TRACE_ON (1U << 31) /* Trace enabled. MUST be the highest bit!*/ #define sf_sanity() (0) #define TRACING (cs->stack->flags & TRACE_ON) |