LINBIT / csync2

file synchronization tool using librsync and current state databases
GNU General Public License v2.0
145 stars 39 forks source link

some warnings at the compilation #41

Open ROBERT-MCDOWELL opened 2 years ago

ROBERT-MCDOWELL commented 2 years ago

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);

ROBERT-MCDOWELL commented 1 year ago

any news?

genbtc commented 8 months ago

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!

ROBERT-MCDOWELL commented 8 months ago

worth to do a PR! thanks