ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Oct 23, 2021 5:49 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Oct 07, 2021 11:38 am 

Joined: Tue Sep 14, 2021 7:40 am
Posts: 2
Hai bro,i don't know why when i compile your tool for termux with architecture arm or aarch64 i always found 3 warning and for error



This the logs of my console
~/packzip $ make
cc -O2 -c libs/7z_advancecomp/*.cc
cc -O2 -c libs/lzma/LzmaDec.c libs/lzma/Lzma2Dec.c libs/lzma/Bra86.c libs/lzma/LzFind.c libs/lzma/LzmaEnc.c libs/lzma/Lzma2Enc.c -D_7ZIP_ST -D_7Z_TYPES_
cc -O2 -c libs/uberflate/uberflate.c
cc -O2 -c compression/advancecomp.cpp
cc -O2 -c compression/adler32.c
cc -O2 -c libs/zopfli/*.c
cc packzip.c -O2 -o packzip *.o -lstdc++ -lz -lm -static
packzip.c:288:48: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
ZopfliCompress(&opt, type, in, insz, &out, &outsz);
^~~~~~
./libs/zopfli/zopfli.h:91:50: note: passing argument to parameter 'outsize' here
unsigned char** out, size_t* outsize);
^
packzip.c:336:89: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'int *' [-Wincompatible-pointer-types]
else { free(out_data); out_data = myzopfli(in_data, in_size, &ret_t, ZOPFLI_FORMAT_ZLIB); ret = ret_t; }
^~~~~~
packzip.c:273:37: note: passing argument to parameter 'ret_outsz' here
u8 *myzopfli(u8 *in, int insz, int *ret_outsz, int type) {
^
packzip.c:342:89: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'int *' [-Wincompatible-pointer-types]
else { free(out_data); out_data = myzopfli(in_data, in_size, &ret_t, ZOPFLI_FORMAT_DEFLATE); ret = ret_t; }
^~~~~~
packzip.c:273:37: note: passing argument to parameter 'ret_outsz' here
u8 *myzopfli(u8 *in, int insz, int *ret_outsz, int type) {
^
packzip.c:486:37: error: function definition is not allowed here
void *SzAlloc(void *p, size_t size) { return(real_calloc(size, 1)); } // xmalloc doesn't return in case of error
^
packzip.c:487:37: error: function definition is not allowed here
void SzFree(void *p, void *address) { if(address) real_free(address); }
^
packzip.c:488:22: error: use of undeclared identifier 'SzAlloc'; did you mean 'g_Alloc'?
ISzAlloc g_Alloc = { SzAlloc, SzFree };
^~~~~~~
g_Alloc
packzip.c:488:10: note: 'g_Alloc' declared here
ISzAlloc g_Alloc = { SzAlloc, SzFree };
^
packzip.c:488:31: error: use of undeclared identifier 'SzFree'
ISzAlloc g_Alloc = { SzAlloc, SzFree };
^
3 warnings and 4 errors generated.
make: *** [Makefile:14: all] Error 1


Please fix it


Oh ya btw i give little change for the makefile but it still cant please help


Top
   
PostPosted: Wed Oct 13, 2021 10:08 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12549
For the first warning it's enough to declare outsz at line 274 as size_t.

For the second warning replace "int *ret_outsz" with "size_t *ret_outsz" at line 273.

For the others try moving the 3 lines at line 486 to line 483 (before the beginning of the lzma_compress function)


Top
   
PostPosted: Thu Oct 14, 2021 10:41 am 

Joined: Tue Sep 14, 2021 7:40 am
Posts: 2
Help me.cause i want to compiled the packzip for termux has error 4 warning three

Code:
~ $ cd /sdcard/packzip
/sdcard/packzip $ make
cc -s -O2 -fstack-protector-all -c libs/7z_advancecomp/*.cc
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc -s -O2 -fstack-protector-all -c libs/lzma/LzmaDec.c libs/lzma/Lzma2Dec.c libs/lzma/Bra86.c libs/lzma/LzFind.c libs/lzma/LzmaEnc.c libs/lzma/Lzma2Enc.c -D_7ZIP_ST -D_7Z_TYPES_
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc -s -O2 -fstack-protector-all -c libs/uberflate/uberflate.c
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc -s -O2 -fstack-protector-all -c compression/advancecomp.cpp
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc -s -O2 -fstack-protector-all -c compression/adler32.c
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc -s -O2 -fstack-protector-all -c libs/zopfli/*.c
clang-12: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
cc packzip.c -s -O2 -fstack-protector-all -o packzip *.o -lstdc++ -lz -lm -static
packzip.c:288:48: warning: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Wincompatible-pointer-types]
    ZopfliCompress(&opt, type, in, insz, &out, &outsz);
                                               ^~~~~~
./libs/zopfli/zopfli.h:91:50: note: passing argument to parameter 'outsize' here
                    unsigned char** out, size_t* outsize);
                                                 ^
packzip.c:336:89: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'int *' [-Wincompatible-pointer-types]
        else                    { free(out_data); out_data = myzopfli(in_data, in_size, &ret_t, ZOPFLI_FORMAT_ZLIB);    ret = ret_t; }
                                                                                        ^~~~~~
packzip.c:273:37: note: passing argument to parameter 'ret_outsz' here
u8 *myzopfli(u8 *in, int insz, int *ret_outsz, int type) {
                                    ^
packzip.c:342:89: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'int *' [-Wincompatible-pointer-types]
        else                    { free(out_data); out_data = myzopfli(in_data, in_size, &ret_t, ZOPFLI_FORMAT_DEFLATE); ret = ret_t; }
                                                                                        ^~~~~~
packzip.c:273:37: note: passing argument to parameter 'ret_outsz' here
u8 *myzopfli(u8 *in, int insz, int *ret_outsz, int type) {
                                    ^
packzip.c:486:37: error: function definition is not allowed here
void *SzAlloc(void *p, size_t size) { return(real_calloc(size, 1)); }  // xmalloc doesn't return in case of error
                                    ^
packzip.c:487:37: error: function definition is not allowed here
void SzFree(void *p, void *address) { if(address) real_free(address); }
                                    ^
packzip.c:488:22: error: use of undeclared identifier 'SzAlloc'; did you mean 'g_Alloc'?
ISzAlloc g_Alloc = { SzAlloc, SzFree };
                     ^~~~~~~
                     g_Alloc
packzip.c:488:10: note: 'g_Alloc' declared here
ISzAlloc g_Alloc = { SzAlloc, SzFree };
         ^
packzip.c:488:31: error: use of undeclared identifier 'SzFree'
ISzAlloc g_Alloc = { SzAlloc, SzFree };
                              ^
3 warnings and 4 errors generated.
make: *** [Makefile:14: all] Error 1
/sdcard/packzip $


Top
   
PostPosted: Thu Oct 14, 2021 10:49 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12549
I already replied you here, why did you post in another topic on a different matter???


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited