diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-10 16:04:07 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-06-10 16:04:07 +0200 |
commit | a10350978814ec7f7ba7e64f6615847e0311cc69 (patch) | |
tree | ac0c8cc9c36841305e8b1568add202c95b44a9fa /sql/time.cc | |
parent | a073ee45c290d81d365b48b03ef6924e778cd64f (diff) | |
download | mariadb-git-a10350978814ec7f7ba7e64f6615847e0311cc69.tar.gz |
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.
Diffstat (limited to 'sql/time.cc')
-rw-r--r-- | sql/time.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/time.cc b/sql/time.cc index fb8a51fd0eb..b9cee5a986a 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -76,8 +76,8 @@ uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year) if (l_time->month == 1 && l_time->day <= 7-weekday) { if (!week_year && - (first_weekday && weekday != 0 || - !first_weekday && weekday >= 4)) + ((first_weekday && weekday != 0) || + (!first_weekday && weekday >= 4))) return 0; week_year= 1; (*year)--; @@ -94,8 +94,8 @@ uint calc_week(MYSQL_TIME *l_time, uint week_behaviour, uint *year) if (week_year && days >= 52*7) { weekday= (weekday + calc_days_in_year(*year)) % 7; - if (!first_weekday && weekday < 4 || - first_weekday && weekday == 0) + if ((!first_weekday && weekday < 4) || + (first_weekday && weekday == 0)) { (*year)++; return 1; |