diff options
author | monty@mysql.com <> | 2004-10-22 18:44:51 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-10-22 18:44:51 +0300 |
commit | 3afecef4df146c1a44f7f17f640f365e251c4438 (patch) | |
tree | 6faefd7a2f197f4031ef94eb74fc71f8f2936185 /mysys | |
parent | 97b4a3415dd2f107c925496fa5c0c0cd96d5db3c (diff) | |
download | mariadb-git-3afecef4df146c1a44f7f17f640f365e251c4438.tar.gz |
Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/hash.c | 1 | ||||
-rw-r--r-- | mysys/my_handler.c | 10 | ||||
-rw-r--r-- | mysys/my_thr_init.c | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index cf0f1d2dde6..d068299d44e 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -174,6 +174,7 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax, /* for compilers which can not handle inline */ +static #if !defined(__SUNPRO_C) && !defined(__USLC__) && !defined(__sgi) inline #endif diff --git a/mysys/my_handler.c b/mysys/my_handler.c index 360a7666e94..00f25924e69 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -309,6 +309,11 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, case HA_KEYTYPE_FLOAT: mi_float4get(f_1,a); mi_float4get(f_2,b); + /* + The following may give a compiler warning about floating point + comparison not being safe, but this is ok in this context as + we are bascily doing sorting + */ if (piks && (flag = CMP_NUM(f_1,f_2))) return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); a= end; @@ -317,6 +322,11 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, case HA_KEYTYPE_DOUBLE: mi_float8get(d_1,a); mi_float8get(d_2,b); + /* + The following may give a compiler warning about floating point + comparison not being safe, but this is ok in this context as + we are bascily doing sorting + */ if (piks && (flag = CMP_NUM(d_1,d_2))) return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); a= end; diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 0ce59bee346..36b37f68b46 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -64,6 +64,11 @@ my_bool my_thread_global_init(void) } #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP pthread_mutexattr_init(&my_fast_mutexattr); + /* + Note that the following statement may give a compiler warning under + some configurations, but there isn't anything we can do about this as + this is a bug in the header files for the thread implementation + */ pthread_mutexattr_setkind_np(&my_fast_mutexattr,PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP |