<AWT Dev> [10] Review request for 8074824: Resolve disabled warnings for libawt_xawt
Semyon Sadetsky
semyon.sadetsky at oracle.com
Tue Oct 17 16:33:20 UTC 2017
Hi Sergey,
On 10/16/2017 04:45 PM, Sergey Bylokhov wrote:
> Hi, Semyon.
> A few notes:> I ran OGL tests and found a typo. Below the update
> webrev> http://cr.openjdk.java.net/~ssadetsky/8074824/webrev.01/
>
> - What is a typo? It seems the v0 and v1 are identical.
It's in line 516 of the OGLPaints.c.
> - The new "IS_SAFE_SIZE_T" macro returns different result than the
> old one for "0"
O.K.
#define IS_SAFE_SIZE_T(x) (((x) + 1) > 0 && \
(x == 0 || (unsigned long long)(x) - 1u <
SIZE_MAX))
I will add this "0" case upon push if you don't mind.
> - What is the reason to inline some of the shaders in OGLPaints.c and
> leave as-is others? For example "noCycleCode" was inlined and
> "texCoordCalcCode" still stored in the "static const char *". It seems
> that the "static const" style is more readable.
It is impossible to have printf() format other then literal string in
gcc without a warning. There is no way to avoid it.
--Semyon
More information about the awt-dev
mailing list