Changeset 5db913f


Ignore:
Timestamp:
Dec 13, 2024, 12:10:39 PM (5 days ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
13519718
Parents:
63b32f9d
Message:

Work around #269 in array bound-check printing, to avoid 32-bit-specific warning. Try to fix nightly build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/collections/array.hfa

    r63b32f9d r5db913f  
    11#pragma once
    22
    3 //#include <assert.h>
    43
    54
     
    98
    109#ifdef __CFA_DEBUG__
     10// FIXME: `len` printing format %ld is a workaround for #269; once fixed, it should be %zd
    1111#define subcheck( arr, sub, len ) \
    1212        if ( (sub) < 0 || (sub) >= (len) ) \
    13                 abort( "subscript %ld exceeds dimension range [0,%zd) for array %p.\n", \
     13                abort( "Subscript %ld exceeds dimension range [0,%ld) for array %p.\n", \
    1414                           (sub), (len), (arr) )
    1515#define subchecku( arr, sub, len ) \
    1616        if ( (sub) >= (len) ) \
    17                 abort( "subscript %ld exceeds dimension range [0,%zd) for array %p.\n", \
     17                abort( "Subscript %ld exceeds dimension range [0,%ld) for array %p.\n", \
    1818                           (sub), (len), (arr) )
    1919#else
Note: See TracChangeset for help on using the changeset viewer.