https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238309
--- Comment #3 from Conrad Meyer <[email protected]> --- dumpconf() is an overloaded API. It is called in multiple ways in geom_dump.c: 1. NULL indent, NULL cp, !NULL pp 2. !NULL indent, NULL cp, !NULL pp 3. !NULL indent, NULL cp, NULL pp I.e., NULL indent => !NULL pp. But !NULL indent implies nothing about pp. The logic in g_slice_dumpconf is correct, though confusing. It would probably be more clear to assert these invariants, which might inform PVS-Studio well enough to clear the false positives. Something like: #define KASSERT_IMPLIES(a, b, c) KASSERT(!(a) || (b), c) ... KASSERT_IMPLIES(indent == NULL, pp != NULL, ("dumpconf API violation")); tl;dr false positive -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
