IOsipov / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

Warnings in building under OSX #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using the patch for porting androguard to OSX
2. make it

What is the expected output? What do you see instead?

claud:~/code/androguard$ make
 CCP dvm.o
 CCP buff.o
 CC z.o
z.c:20:17: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const 
unsigned char *' discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
z.c:47:17: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const 
unsigned char *' discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
2 warnings generated.
 CC bz2.o
bz2.c:19:17: warning: assigning to 'char *' from 'const unsigned char *' 
discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
bz2.c:20:18: warning: assigning to 'char *' from 'unsigned char *' converts 
between pointers to integer types with different sign [-Wpointer-sign]
   strm.next_out = odata;
                 ^ ~~~~~
2 warnings generated.
 CC smaz.o
smaz.c:139:24: warning: comparison of unsigned expression < 0 is always false 
[-Wtautological-compare]
            if (outlen < 0) return _outlen+1;
                ~~~~~~ ^ ~
1 warning generated.
 CC xz.o
 CC Alloc.o
 CC LzFind.o
 CC LzmaDec.o
 CC LzmaEnc.o
LzmaEnc.c:2081:6: warning: explicitly assigning a variable of type 
'CLzmaEncHandle' (aka 'void *') to itself [-Wself-assign]
  pp = pp;
  ~~ ^ ~~
1 warning generated.
 CC LzmaLib.o
LzmaLib.c:11:48: warning: explicitly assigning a variable of type 'void *' to 
itself [-Wself-assign]
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
                                             ~ ^ ~
LzmaLib.c:12:48: warning: explicitly assigning a variable of type 'void *' to 
itself [-Wself-assign]
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
                                             ~ ^ ~
2 warnings generated.
 CC lzma.o
 CC snappy.o
 CC vcblocksort.o
 CC similarity.o
similarity.c:114:13: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
    if (ret < 0) {
        ~~~ ^ ~
similarity.c:147:17: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
        if (ret < 0) {
            ~~~ ^ ~
similarity.c:161:17: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
        if (ret < 0) {
            ~~~ ^ ~
similarity.c:184:13: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
    if (ret < 0) {
        ~~~ ^ ~
similarity.c:234:17: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
        if (ret < 0) {
            ~~~ ^ ~
similarity.c:247:17: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
        if (ret < 0) {
            ~~~ ^ ~
similarity.c:269:13: warning: comparison of unsigned expression < 0 is always 
false [-Wtautological-compare]
    if (ret < 0) {
        ~~~ ^ ~
7 warnings generated.
 CC formula.o
 CC elsign.o

What version of the product are you using? On what operating system?
Mac OS X 10.7.3, Xcode 4.3.1, g++ 4.2.1

Please provide any additional information below.
I think these warnings are not introduced by my patch. 

Original issue reported on code.google.com by xiaozih...@gmail.com on 21 Mar 2012 at 3:40

GoogleCodeExporter commented 9 years ago
Thx.

Can you test with the mercurial repository ?

Original comment by anthony....@gmail.com on 23 Mar 2012 at 8:47

GoogleCodeExporter commented 9 years ago
There're still some warnings. I've read the code. I think they're not such big 
problems and so can be ignored.

here are details:

 CCP dvm.o
 CCP buff.o
 CC z.o
z.c:20:17: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const 
unsigned char *' discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
z.c:47:17: warning: assigning to 'Bytef *' (aka 'unsigned char *') from 'const 
unsigned char *' discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
2 warnings generated.
 CC bz2.o
bz2.c:19:17: warning: assigning to 'char *' from 'const unsigned char *' 
discards qualifiers [-Wincompatible-pointer-types]
   strm.next_in = data;
                ^ ~~~~
bz2.c:20:18: warning: assigning to 'char *' from 'unsigned char *' converts 
between pointers to integer types with different sign [-Wpointer-sign]
   strm.next_out = odata;
                 ^ ~~~~~
2 warnings generated.
 CC smaz.o
smaz.c:139:24: warning: comparison of unsigned expression < 0 is always false 
[-Wtautological-compare]
            if (outlen < 0) return _outlen+1;
                ~~~~~~ ^ ~
1 warning generated.
 CC xz.o
 CC Alloc.o
 CC LzFind.o
 CC LzmaDec.o
 CC LzmaEnc.o
LzmaEnc.c:2081:6: warning: explicitly assigning a variable of type 
'CLzmaEncHandle' (aka 'void *') to itself [-Wself-assign]
  pp = pp;
  ~~ ^ ~~
1 warning generated.
 CC LzmaLib.o
LzmaLib.c:11:48: warning: explicitly assigning a variable of type 'void *' to 
itself [-Wself-assign]
static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); }
                                             ~ ^ ~
LzmaLib.c:12:48: warning: explicitly assigning a variable of type 'void *' to 
itself [-Wself-assign]
static void SzFree(void *p, void *address) { p = p; MyFree(address); }
                                             ~ ^ ~
2 warnings generated.
 CC lzma.o
 CC snappy.o
 CC vcblocksort.o
 CC similarity.o
 CC formula.o
 CC elsign.o

Original comment by xiaozih...@gmail.com on 23 Mar 2012 at 9:27

GoogleCodeExporter commented 9 years ago

Original comment by anthony....@gmail.com on 27 Jun 2012 at 7:14