assertion_count(file, line);
r = my_GetFileInformationByName(pathname, &bhfi);
- if (r != 0 && bhfi.nNumberOfLinks == nlinks)
+ if (r != 0 && bhfi.nNumberOfLinks == (DWORD)nlinks)
return (1);
failure_start(file, line, "File %s has %d links, expected %d",
pathname, bhfi.nNumberOfLinks, nlinks);
/* Exercise --help option. */
r = systemf("%s --help >help.stdout 2>help.stderr", testprog);
+ assertEqualInt(r, 0);
failure("--help should generate nothing to stderr.");
assertEmptyFile("help.stderr");
/* Help message should start with name of program. */
/* -h option should generate the same output. */
r = systemf("%s -h >h.stdout 2>h.stderr", testprog);
+ assertEqualInt(r, 0);
failure("-h should generate nothing to stderr.");
assertEmptyFile("h.stderr");
failure("stdout should be same for -h and --help");
/* -W help should be another synonym. */
r = systemf("%s -W help >Whelp.stdout 2>Whelp.stderr", testprog);
+ assertEqualInt(r, 0);
failure("-W help should generate nothing to stderr.");
assertEmptyFile("Whelp.stderr");
failure("stdout should be same for -W help and --help");
assertion_count(file, line);
r = my_GetFileInformationByName(pathname, &bhfi);
- if (r != 0 && bhfi.nNumberOfLinks == nlinks)
+ if (r != 0 && bhfi.nNumberOfLinks == (DWORD)nlinks)
return (1);
failure_start(file, line, "File %s has %d links, expected %d",
pathname, bhfi.nNumberOfLinks, nlinks);
const char *xname; /* For xattr tests. */
const void *xval; /* For xattr tests. */
size_t xsize; /* For xattr tests. */
- int c;
wchar_t wc;
long l;
skipping("ACL preserved by archive_entry_clone()");
#else
/* Verify ACL was copied. */
- assertEqualInt(4, c = archive_entry_acl_reset(e2,
+ assertEqualInt(4, archive_entry_acl_reset(e2,
ARCHIVE_ENTRY_ACL_TYPE_ACCESS));
/* First three are standard permission bits. */
assertEqualInt(0, archive_entry_acl_next(e2,
skipping("xattr data preserved by archive_entry_clone");
#else
/* Verify xattr was copied. */
- assertEqualInt(1, c = archive_entry_xattr_reset(e2));
+ assertEqualInt(1, archive_entry_xattr_reset(e2));
assertEqualInt(0, archive_entry_xattr_next(e2, &xname, &xval, &xsize));
assertEqualString(xname, "xattr1");
assertEqualString(xval, "xattrvalue");
skipping("ACL held by clone of archive_entry");
#else
/* Verify ACL was unchanged. */
- assertEqualInt(4, c = archive_entry_acl_reset(e2,
+ assertEqualInt(4, archive_entry_acl_reset(e2,
ARCHIVE_ENTRY_ACL_TYPE_ACCESS));
/* First three are standard permission bits. */
assertEqualInt(0, archive_entry_acl_next(e2,
assertion_count(file, line);
r = my_GetFileInformationByName(pathname, &bhfi);
- if (r != 0 && bhfi.nNumberOfLinks == nlinks)
+ if (r != 0 && bhfi.nNumberOfLinks == (DWORD)nlinks)
return (1);
failure_start(file, line, "File %s has %d links, expected %d",
pathname, bhfi.nNumberOfLinks, nlinks);
/* Exercise --help option. */
r = systemf("%s --help >help.stdout 2>help.stderr", testprog);
+ assertEqualInt(r, 0);
failure("--help should generate nothing to stderr.");
assertEmptyFile("help.stderr");
/* Help message should start with name of program. */
/* -h option should generate the same output. */
r = systemf("%s -h >h.stdout 2>h.stderr", testprog);
+ assertEqualInt(r, 0);
failure("-h should generate nothing to stderr.");
assertEmptyFile("h.stderr");
failure("stdout should be same for -h and --help");
/* -W help should be another synonym. */
r = systemf("%s -W help >Whelp.stdout 2>Whelp.stderr", testprog);
+ assertEqualInt(r, 0);
failure("-W help should generate nothing to stderr.");
assertEmptyFile("Whelp.stderr");
failure("stdout should be same for -W help and --help");
return;
}
- while ((tree_ret = tree_next(tree))) {
+ while ((tree_ret = tree_next(tree)) != 0) {
int r;
const char *name = tree_current_path(tree);
const struct stat *st = NULL; /* info to use for this entry */