What steps will reproduce the problem?
1. Compile ANGLE with clang with -Wshorten-64-to-32 warning enabled.
What is the expected output? What do you see instead?
Expected no warnings. Got warnings.
What version of the product are you using? On what operating system?
ANGLE r1641 merged into the WebKit project.
Please provide any additional information below.
Tokenizer.cpp:1380:21: error: implicit conversion loses integer precision:
'yy_size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
yyg->yy_n_chars, num_to_read );
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
Tokenizer.cpp:562:39: note: expanded from:
result = yyextra->input.read(buf, maxSize);
^
1 error generated.
This is caused by pp::Input::read() using an int instead of size_t for its
'maxSize' parameter:
int Input::read(char* buf, int maxSize)
Changing the type of 'maxSize' from 'int' to 'size_t' fixes the issue, although
there are many other uses of 'int' that should probably be size_t in the
pp::Input::read() method such as local variables, mReadLoc.cIndex and mLength
(a std::vector<int>; see also Issue 406).
Original issue reported on code.google.com by ddkilzer@gmail.com on 27 Jan 2013 at 10:15
Original issue reported on code.google.com by
ddkilzer@gmail.com
on 27 Jan 2013 at 10:15