• Bug#1103282: hwloc-contrib: FTBFS hwloc_type_sscanf: hwloc_type_sscanf.

    From Samuel Thibault@21:1/5 to All on Thu Apr 17 13:40:01 2025
    Hello,

    Andreas Beckmann, le mer. 16 avril 2025 04:35:58 +0200, a ecrit:
    hwloc_type_sscanf: hwloc_type_sscanf.c:40: _check: Assertion `depth == (int) obj->depth' failed.

    Divination told me that perhaps the attached patch could help?

    Samuel

    diff --git a/tests/hwloc/hwloc_type_sscanf.c b/tests/hwloc/hwloc_type_sscanf.c index 742df3d7..127cee7b 100644
    --- a/tests/hwloc/hwloc_type_sscanf.c
    +++ b/tests/hwloc/hwloc_type_sscanf.c
    @@ -37,7 +37,7 @@ static void _check(hwloc_topology_t topology, hwloc_obj_t obj, const char *buffe

    err = hwloc_type_sscanf_as_depth(buffer, NULL, topology, &depth);
    assert(!err);
    - assert(depth == (int) obj->depth);
    + assert(depth == HWLOC_TYPE_DEPTH_MULTIPLE || depth == (int) obj->depth);
    }

    static void check(hwloc_topology_t topology, hwloc_obj_t obj)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)