mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2 Compiling MySQL with gcc 4.3.2 and later produces a number of warnings, many of which are new with the recent compiler versions. This bug will be resolved in more than one patch to limit the size of changesets. This is the second patch, fixing more of the warnings.
This commit is contained in:
@ -1046,12 +1046,12 @@ static void acl_update_user(const char *user, const char *host,
|
||||
for (uint i=0 ; i < acl_users.elements ; i++)
|
||||
{
|
||||
ACL_USER *acl_user=dynamic_element(&acl_users,i,ACL_USER*);
|
||||
if (!acl_user->user && !user[0] ||
|
||||
acl_user->user && !strcmp(user,acl_user->user))
|
||||
if ((!acl_user->user && !user[0]) ||
|
||||
(acl_user->user && !strcmp(user,acl_user->user)))
|
||||
{
|
||||
if (!acl_user->host.hostname && !host[0] ||
|
||||
acl_user->host.hostname &&
|
||||
!my_strcasecmp(system_charset_info, host, acl_user->host.hostname))
|
||||
if ((!acl_user->host.hostname && !host[0]) ||
|
||||
(acl_user->host.hostname &&
|
||||
!my_strcasecmp(system_charset_info, host, acl_user->host.hostname)))
|
||||
{
|
||||
acl_user->access=privileges;
|
||||
if (mqh->specified_limits & USER_RESOURCES::QUERIES_PER_HOUR)
|
||||
@ -1129,16 +1129,16 @@ static void acl_update_db(const char *user, const char *host, const char *db,
|
||||
for (uint i=0 ; i < acl_dbs.elements ; i++)
|
||||
{
|
||||
ACL_DB *acl_db=dynamic_element(&acl_dbs,i,ACL_DB*);
|
||||
if (!acl_db->user && !user[0] ||
|
||||
acl_db->user &&
|
||||
!strcmp(user,acl_db->user))
|
||||
if ((!acl_db->user && !user[0]) ||
|
||||
(acl_db->user &&
|
||||
!strcmp(user,acl_db->user)))
|
||||
{
|
||||
if (!acl_db->host.hostname && !host[0] ||
|
||||
acl_db->host.hostname &&
|
||||
!strcmp(host, acl_db->host.hostname))
|
||||
if ((!acl_db->host.hostname && !host[0]) ||
|
||||
(acl_db->host.hostname &&
|
||||
!strcmp(host, acl_db->host.hostname)))
|
||||
{
|
||||
if (!acl_db->db && !db[0] ||
|
||||
acl_db->db && !strcmp(db,acl_db->db))
|
||||
if ((!acl_db->db && !db[0]) ||
|
||||
(acl_db->db && !strcmp(db,acl_db->db)))
|
||||
{
|
||||
if (privileges)
|
||||
acl_db->access=privileges;
|
||||
@ -1345,8 +1345,8 @@ bool acl_check_host(const char *host, const char *ip)
|
||||
return 0;
|
||||
VOID(pthread_mutex_lock(&acl_cache->lock));
|
||||
|
||||
if (host && hash_search(&acl_check_hosts,(byte*) host,(uint) strlen(host)) ||
|
||||
ip && hash_search(&acl_check_hosts,(byte*) ip,(uint) strlen(ip)))
|
||||
if ((host && hash_search(&acl_check_hosts,(byte*) host,(uint) strlen(host))) ||
|
||||
(ip && hash_search(&acl_check_hosts,(byte*) ip,(uint) strlen(ip))))
|
||||
{
|
||||
VOID(pthread_mutex_unlock(&acl_cache->lock));
|
||||
return 0; // Found host
|
||||
@ -1564,8 +1564,8 @@ find_acl_user(const char *host, const char *user, my_bool exact)
|
||||
host,
|
||||
acl_user->host.hostname ? acl_user->host.hostname :
|
||||
""));
|
||||
if (!acl_user->user && !user[0] ||
|
||||
acl_user->user && !strcmp(user,acl_user->user))
|
||||
if ((!acl_user->user && !user[0]) ||
|
||||
(acl_user->user && !strcmp(user,acl_user->user)))
|
||||
{
|
||||
if (exact ? !my_strcasecmp(system_charset_info, host,
|
||||
acl_user->host.hostname ?
|
||||
|
Reference in New Issue
Block a user