Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Issue 9420032: Take care of two Clang warnings. (Closed)

Created:
8 years, 10 months ago by jungshik at Google
Modified:
8 years, 10 months ago
Reviewers:
Nico
CC:
chromium-reviews
Visibility:
Public.

Description

Take care of two Clang warnings. - decNumber.c has several places where Clang complains about array index out-of-bounds error. According to udecnum.h, it's done on purpose because the array in question (lsu) is followed by additional spaces for digits. So, we suppress 'array-bounds' warning with clang-specific pragmas. GCC 4.6 also complains about this, but it's hard to make GCC 4.4 and GCC 4.6 happy at the same time without getting too ugly because GCC 4.4 does not support 'pragra diagnostic {push|pop}' See http://bugs.icu-project.org/trac/ticket/8954 - colldata.cpp copies an array of UnicodeString's with memcpy. It's changed to to use a for-loop, instead. The upstream ToT has fixed this. BUG=84851, 92756 TEST=Compile with Clang and it does not complain any more in devNumber.c and colldata.cpp Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=122423

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : #

Total comments: 1

Patch Set 4 : final patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -7 lines) Patch
M README.chromium View 1 chunk +2 lines, -0 lines 0 comments Download
M icu.gyp View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M patches/clang.patch View 1 2 3 1 chunk +76 lines, -0 lines 0 comments Download
M source/i18n/colldata.cpp View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M source/i18n/decNumber.c View 1 2 6 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jungshik at Google
clang is happy with this CL. (patch set 2) gcc 4.6 gives a similar warning ...
8 years, 10 months ago (2012-02-17 00:23:41 UTC) #1
Nico
Thanks! Can you remove the -Wno-array-bounds from icu.gyp again? (I added it earlier today.) http://codereview.chromium.org/9420032/diff/2002/source/i18n/decNumber.c ...
8 years, 10 months ago (2012-02-17 00:29:37 UTC) #2
jungshik at Google
Nico, can you take a look at patch set #3? #pragma GCC diagnostic push #pragma ...
8 years, 10 months ago (2012-02-17 01:06:58 UTC) #3
Nico
8 years, 10 months ago (2012-02-17 01:10:51 UTC) #4
lgtm with updated patch file

thanks!

http://codereview.chromium.org/9420032/diff/1006/patches/clang.patch
File patches/clang.patch (right):

http://codereview.chromium.org/9420032/diff/1006/patches/clang.patch#newcode69
patches/clang.patch:69: +      #ifdef __clang__
Looks like the patch file still has the old change

Powered by Google App Engine
This is Rietveld 408576698