[Bug 268209] sysutils/pftop: fix build with clang 15

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 06 Dec 2022 21:14:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268209

            Bug ID: 268209
           Summary: sysutils/pftop: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: grembo@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(grembo@FreeBSD.org)
          Assignee: grembo@FreeBSD.org

During an exp-run for llvm 15 (see bug 265425), it turned out that
sysutils/pftop failed to build with clang 15:

    pftop.c:1656:28: error: incompatible pointer to integer conversion
    passing 'counter_u64_t' (aka 'unsigned long *') to parameter of type
    'u_int64_t' (aka 'unsigned long'); dereference with * [-Wint-conversion]
            print_fld_size(FLD_STATS, pr->states_tot);
                                      ^~~~~~~~~~~~~~
                                      *

Indeed, the states_tot field is a pointer, and must be derefenced first.

-- 
You are receiving this mail because:
You are the assignee for the bug.