Comments (7)
I put in a (void) to make it explicit that I consciously decided to ignore the return code. That should not generate a warning.
from pigz.
And it should please also respect the LDFLAGS from environment. Proposal:
diff --git a/Makefile b/Makefile
index 6524ef3..f7f6191 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC=cc
CFLAGS=-O3 -Wall -Wextra
-LDFLAGS=-lz
+LDFLAGS+=-lz
ZOPFLI=zopfli/src/zopfli/
# use gcc and gmake on Solaris
from pigz.
Sorry, (void) doesn't help here. I had to find a workaround in one of my projects for this check. Quote:
// STFU helpers, (void) casts are not effective for certain functions
static inline void ignore_value (int i) { (void) i; }
static inline void ignore_ptr (void* p) { (void) p; }
from pigz.
You only got a warning for chown?
from pigz.
Your suggestion for += in the Makefile is a different issue. You should create a new issue for that, and not mix it up with voided return codes.
from pigz.
Yes, only this one. For example, see https://buildd.debian.org/status/fetch.php?pkg=pigz&arch=i386&ver=2.3.3-1&stamp=1422210364 .
Regarding += issue, that one is partially related, at least from my perspective. This style of value assignment (and gmake's lazy initialization rules) prevented the hardening flags from being passed. I used a workaround in the meantime (pushing CPPFLAGS/LDFLAGS/etc. from the make command line) and it's OK, so no new item related to that for now.
from pigz.
Then it's a bug in the compiler. The behavior should be consistent with all of the other occurrences of voided return values, such as the chmod() and utimes() in the same routine, and the other dozen or more times int return values are voided in pigz.c. Either all of them should get the warning, or none of them should.
from pigz.
Related Issues (20)
- number of online processors when some cores are isolated via kernel HOT 3
- pigz decompress performance drops when overwriting file HOT 2
- del
- 2.7 tests: undefined reference to `COMB' with NOTHREAD HOT 1
- Indeterministic results HOT 2
- Errors in test suite when running with UBSAN HOT 5
- Zipping a directory issue. HOT 5
- `make tests` errors out with version 2.7 HOT 2
- pigz errors out with zlib-1.3 ("zlib version less than 1.2.3") HOT 7
- does pigz have public API for C? HOT 1
- Allow CFLAGS and LDFLAGS from environnement HOT 9
- pigz: can't destroy locked resource (pigz.c:2015:mutex_destroy) pigz: abort: internal threads error HOT 7
- pigz hanging waiting on lock HOT 4
- Segmentation fault in unpigz HOT 2
- Pipe input on Windows? HOT 3
- An improper locking due to the unreleased lock before program exit HOT 2
- unpigz -l failed with "can't destroy locked resource" HOT 3
- Undefined reference to COMB with NOTHREADS HOT 1
- Thread limiter doesnt seem to work on RHEL 7.9 HOT 3
- Feature request: --files-from HOT 1
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 pigz.