Open ROBERT-MCDOWELL opened 2 years ago
any news?
just stumbling by. the first two warnings can be fixed by changing fclose into pclose - when used with popen. the last one indicated mismatched enum / int types (implicit conversion is deprecated). gl!
worth to do a PR! thanks
update.c: In function ‘csync_diff’: update.c:915:9: warning: ‘fclose’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 915 | fclose(p); | ^
~~~~ update.c:909:13: note: returned from ‘popen’ 909 | p = popen(buffer, "w"); | ^~~~~~ update.c:915:9: warning: ‘fclose’ called on pointer returned from a mismatched allocation function [-Wmismatched-dealloc] 915 | fclose(p); | ^~~~~ update.c:909:13: note: returned from ‘popen’ 909 | p = popen(buffer, "w"); | ^~~~~~ mv -f .deps/update.Tpo .deps/update.Po gcc -DHAVE_CONFIG_H -I. -D'DBDIR="/var/lib/csync2"' -D'ETCDIR="/etc/csync2"' -I/usr/incl ude/p11-kit-1 -Wall -g -O2 -MT urlencode.o -MD -MP -MF .deps/urlencode.Tpo -c -o urlenco de.o urlencode.c mv -f .deps/urlencode.Tpo .deps/urlencode.Po gcc -DHAVE_CONFIG_H -I. -D'DBDIR="/var/lib/csync2"' -D'ETCDIR="/etc/csync2"' -I/usr/incl ude/p11-kit-1 -Wall -g -O2 -MT conn.o -MD -MP -MF .deps/conn.Tpo -c -o conn.o conn.c conn.c:76:13: warning: conflicting types for ‘conn_response’ due to enum/integer mismatch; have ‘const char (unsigned int)’ [-Wenum-int-mismatch] 76 | const char conn_response(unsigned i) | ^~~~~ In file included from conn.c:21: csync2.h:150:20: note: previous declaration of ‘conn_response’ with type ‘const char (enu m connection_response)’ 150 | extern const char conn_response(enum connection_response);