surveiller les warnings du gcc

This commit is contained in:
tTh
2022-01-22 14:47:46 +01:00
parent af7266eb30
commit 3f7abf4ea0
6 changed files with 20 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
#  some ugly experiments, do not use in production
#
COPT = -Wall -fpic -g -DDEBUG_LEVEL=1 -lm
COPT = -Wall -Wextra -fpic -g -DDEBUG_LEVEL=1 -lm
DEPS = ../floatimg.h ../libfloatimg.a Makefile
LIBS = ../libfloatimg.a -ltiff -lpnglite -lcfitsio -lm

View File

@@ -11,7 +11,7 @@
int verbosity;
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* --------------------------------------------------------------- */
int triplane_muxer(FloatImg *sr, FloatImg *sg, FloatImg *sb,
FloatImg *dst, int flages)
@@ -40,7 +40,7 @@ memcpy(dst->B, sb->B, sz);
return 0;
}
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* --------------------------------------------------------------- */
int try_this_muxplane(char *fr, char *fg, char *fb, char *dst, int flags)
{
int foo;
@@ -72,14 +72,18 @@ if (foo) {
return foo;
}
fimg_export_picture(&dest, dst, 0);
foo = fimg_export_picture(&dest, dst, 0);
if (foo) {
fprintf(stderr, "%s: err %d exporting to %s\n", __func__, foo, dst);
return foo;
}
fimg_destroy(&imr); fimg_destroy(&img);
fimg_destroy(&imr); fimg_destroy(&dest);
fimg_destroy(&imb); fimg_destroy(&dest);
return 0;
}
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* --------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
@@ -90,6 +94,11 @@ if (5 != argc) {
return 1;
}
/*
* and now, we have to decipher options on the
* command line.
*/
foo = try_this_muxplane(argv[1], argv[2], argv[3], argv[4], 0);
if (foo) {
fprintf(stderr, "oups %d\n", foo);
@@ -98,4 +107,4 @@ if (foo) {
return 0;
}
/* ---------------------------------------------- ~~~~~~~~~~~~~~~~ */
/* --------------------------------------------------------------- */