source3/torture/pdbtest.c:192:22: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op] Source code is d1_buf = pdb_get_hours(s1); d2_buf = pdb_get_hours(s2); if (d2_buf == NULL && d2_buf != NULL) { Maybe better code: d1_buf = pdb_get_hours(s1); d2_buf = pdb_get_hours(s2); if (d1_buf == NULL && d2_buf != NULL) {
Still broken some seven months later. Not much point sending in bug reports if they get ignored.
Sorry, this is a low priority - it's in test code. I appreciate you provided a fix here, but a better way to get attention would be to submit as a git-am format patch to samba-technical@lists.samba.org. This is worth fixing in master, but not back-porting as a bug to current release branches. Jeremy.
but submitting a patch via Bugzilla also perfectly fine of course. For a to post to the list you would have to be subscribed, which not everybody wants to. We should definetely all watch bugzilla bugs closer.
Obvious untested patch: diff -c ./source3/torture/pdbtest.c.sav ./source3/torture/pdbtest.c *** ./source3/torture/pdbtest.c.sav 2019-04-04 09:29:21.327102480 +0100 --- ./source3/torture/pdbtest.c 2019-04-04 09:29:30.714048329 +0100 *************** *** 191,197 **** } else if (pdb_get_hours_len(s1) != 0) { d1_buf = pdb_get_hours(s1); d2_buf = pdb_get_hours(s2); ! if (d2_buf == NULL && d2_buf != NULL) { DEBUG(0, ("Logon hours is not set\n")); ret = False; } else if (d1_buf == NULL) { --- 191,197 ---- } else if (pdb_get_hours_len(s1) != 0) { d1_buf = pdb_get_hours(s1); d2_buf = pdb_get_hours(s2); ! if (d1_buf == NULL && d2_buf != NULL) { DEBUG(0, ("Logon hours is not set\n")); ret = False; } else if (d1_buf == NULL) {