test: fix build warnings for most tests

Let rsync.c continue to warn, it's not complete ...

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-10-03 12:22:33 +02:00
1 parent 75139cdf3c
commit ef4a8691d3
4 files changed
+16 -13

No files matched your search

+4 -5
View File
@@ -13,24 +13,23 @@
int main(void)
{
int ret;
FILE *fp;
char buf[80] = "";
FILE *fp;
printf("Before tempfile():\n");
ret = system("ls -lrt " _PATH_TMP " | tail -3");
system("ls -lrt " _PATH_TMP " | tail -3");
fp = tempfile();
fail_unless(fp != NULL);
ret = fputs(READBACK, fp);
fputs(READBACK, fp);
rewind(fp);
if (fgets(buf, sizeof(buf), fp))
fprintf(stderr, "\nRead-back from tempfile: %s", buf);
fail_unless(!strcmp(buf, READBACK));
printf("\nAfter tempfile(), should be same list:\n");
ret = system("ls -lrt " _PATH_TMP " | tail -3");
system("ls -lrt " _PATH_TMP " | tail -3");
return fclose(fp);
}