Comments (10)
you are missing a )
should be (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize));
from leanify.
If you cherry pick this commit it should fix the issue, I just haven't updated my fork yet
google/zopfli@60503d1
from leanify.
Now I'm getting
lib/zopfli/cache.c: In function 'ZopfliInitCache':
lib/zopfli/cache.c:36:51: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Werror=format=]
36 | "Error: Out of memory. Tried allocating %lu bytes of memory.\n",
| ~~^
| |
| long unsigned int
| %llu
37 | (unsigned long)ZOPFLI_CACHE_LENGTH * 3 * blocksize);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| size_t {aka long long unsigned int}
cc1.exe: all warnings being treated as errors
mingw32-make: *** [<builtin>: lib/zopfli/cache.o] Error 1
from leanify.
hmm, maybe change it to (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize)
instead?
from leanify.
Now all builds are failing
gcc:
lib/zopfli/cache.c:37:61: error: expected ')' before 'exit'
37 | (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize)
| ^
| )
38 | exit (EXIT_FAILURE);
| ~~~~
lib/zopfli/cache.c:35:12: note: to match this '('
35 | fprintf(stderr,
| ^
lib/zopfli/cache.c:38:25: error: expected ';' before '}' token
38 | exit (EXIT_FAILURE);
| ^
| ;
39 | }
| ~
clang:
lib/zopfli/cache.c:38:5: error: expected ')'
exit (EXIT_FAILURE);
^
lib/zopfli/cache.c:35:12: note: to match this '('
fprintf(stderr,
^
1 error generated.
from leanify.
Did you replaced the whole line? 😅 you need to add );
after that
from leanify.
That's what I tried at first but the error is nearly the same with ";".
lib/zopfli/cache.c:37:61: error: expected ')' before ';' token
37 | (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize);
| ^
| )
lib/zopfli/cache.c:35:12: note: to match this '('
35 | fprintf(stderr,
| ^
lib/zopfli/cache.c:38:25: error: expected ';' before '}' token
38 | exit (EXIT_FAILURE);
| ^
| ;
39 | }
| ~
from leanify.
It seems to be working on Windows now but only for gcc. clang returns this
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\any:22:2: error: class any requires static RTTI.
#error class any requires static RTTI.
^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\any:239:16: error: use of typeid requires -frtti
return typeid(void);
^
main.cpp:165:15: error: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
is_pause = !getenv("PROMPT");
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdlib.h:1183:20: note: 'getenv' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
#define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \
^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
^
3 errors generated.
mingw32-make: *** [<builtin>: main.o] Error 1
from leanify.
That error is from your Visual Studio, not related to leanify
from leanify.
Ok
from leanify.
Related Issues (20)
- wasm support
- Recursive compression of images within epub files HOT 3
- How can I restrict specific files or file types from being optimized? HOT 2
- Please release a new version. HOT 5
- LossLess JPEG optimization? HOT 2
- fatal error: 'stdio.h' file not found HOT 1
- Building from source fails HOT 5
- `Map file error: No such device` using mergerFS HOT 2
- [Bug Report]heap-buffer-overflow in function LeanifyFile():leanify.cpp:140 HOT 3
- Add SECURITY.md HOT 5
- [Bug]out-of-memory in function get_mutable_buffer():/pugixml.cpp:2051
- pixel per inch HOT 2
- make error: lib/LZMA/LzmaEnc.c:2996:19: error: storing the address of local variable ‘outStream’ in ‘p_16->rc.outStream’ [-Werror=dangling-pointer=] HOT 1
- Cflags issue on Apple M1 (ARM) HOT 3
- [NOISSUE] Was there previously a GUI version called Leanify++? HOT 1
- Is arm64 / aarch64 architecture supported? HOT 1
- Is there a way that to both keep Photo's EXIF and remove Location? HOT 2
- Need periodic releases so that this excellent tool can be picked up by linux/arch repos. HOT 1
- Bump version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leanify.