bachphuc / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

v0_2 build errors on head of git for Windows #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
using public head:
git clone http://git.chromium.org/webm/libwebp.git
build webp with hammer which uses /W4 /WX

dsp\enc_sse2.c(668) : warning C4013: 'abs' undefined; assuming extern returning 
int
utils\tcoder.c(485) : warning C4013: 'log2' undefined; assuming extern 
returning int
utils\bit_reader.c(168) : warning C4244: 'initializing' : conversion from 
'uint64_t' to 'const uint32_t', possible loss of data
utils\bit_reader.c(197) : warning C4244: '=' : conversion from 'uint64_t' to 
'uint32_t', possible loss of data
utils\bit_reader.h(124) : warning C4244: 'initializing' : conversion from 
'bit_t' to 'const int', possible loss of data
utils\bit_reader.h(185) : warning C4244: 'initializing' : conversion from 
'uint64_t' to 'const uint32_t', possible loss of data

Original issue reported on code.google.com by fbarch...@google.com on 19 Apr 2012 at 8:20

GoogleCodeExporter commented 9 years ago
utils\tcoder.c(485) : warning C4013: 'log2' undefined; assuming extern 
returning int

See Makefile.vc, you need to define NOT_HAVE_LOG2

The rest are probably valid, though strangely I don't see the abs() warning 
with my configuration. May be a difference in sdk headers, stdlib.h does appear 
to be missing there.

Original comment by jz...@chromium.org on 19 Apr 2012 at 8:33

GoogleCodeExporter commented 9 years ago
Adding these works around the issues

win_ccflags = [                                                           
  '/wd4244',  # conversion from 'uint64_t' to 'const uint32_t'            
  '/wd4701',  # potentially uninitialized local variable 'packed_pixels'  
],                                                                        
cppdefines = [                                                            
  'NOT_HAVE_LOG2',                                                        
],                                                                        

Original comment by fbarch...@google.com on 19 Apr 2012 at 9:03

GoogleCodeExporter commented 9 years ago
For dsp\enc_sse2.c I added #include <stdlib.h>

Original comment by fbarch...@google.com on 19 Apr 2012 at 9:05

GoogleCodeExporter commented 9 years ago
https://gerrit.chromium.org/gerrit/#change,20650

For stdlib.h.

Original comment by jz...@google.com on 19 Apr 2012 at 10:51

GoogleCodeExporter commented 9 years ago
linux/mac don't like NOT_HAVE_LOG2.  Need to do it just for Windows eh

/builddata/pulse-data/agents/wpyg7.hot/recipes/154649774/base/googleclient/third
_party/libwebp/files/utils/tcoder.c:92: error: static declaration of 'log2' 
follows non-static declaration

Original comment by fbarch...@google.com on 20 Apr 2012 at 11:36

GoogleCodeExporter commented 9 years ago
Warnings should be silent now, some related changes:

a6cdf71 muxedit: a few more size_t changes
11ae46a alpha.c: quiet some size_t -> int conversion warnings
d96e722 huffman: quiet int64 -> int conversion warning
532020f lossless: remove some size_t -> int conversions
95667b8 mux: use size_t consistently
80256b8 enc_sse2 add missing stdlib.h include
9b3d1f3 decode.h: use size_t consistently
1c92bd3 vp8io: use size_t for buffer size
90ead71 fix some more uint32_t -> size_t typing
cbe705c webp/decode.h: fix prototypes
6860c2e fix some uint32_t -> size_t typing

Looking at simplifying the NOT_HAVE_LOG2 define for msvc
https://gerrit.chromium.org/gerrit/#change,21838

Original comment by jz...@google.com on 4 May 2012 at 12:08

GoogleCodeExporter commented 9 years ago
Last changed merged, should be good now.

Original comment by jz...@google.com on 4 May 2012 at 5:43