Changeset 2103

Show
Ignore:
Timestamp:
03/31/12 02:46:33 (11 years ago)
Author:
jwoithe
Message:

typecast size_t printf() parameters to prevent format warnings and use an appropriate format specifier. The cast is to 'unsigned long long' because size_t is an unsigned type, and we need to allow for the possibility that size_t is 64-bit (as it will be on 64-bit systems) - even though in this context the value of the size_t object won't go anywhere near the maximum of an unsigned 32-bit integer. Thanks to Yves Grenier for pointing out the warnings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_eap.cpp

    r2098 r2103  
    16111611    // print the peak space as it also contains the routing configuration 
    16121612    printMessage("Router sources:\n"); 
    1613     printMessage(" %ld sources:\n", m_sources.size()); 
     1613    printMessage(" %llu sources:\n", (unsigned long long)m_sources.size()); 
    16141614    for ( std::map<std::string, int>::iterator it=m_sources.begin(); it!=m_sources.end(); ++it ) { 
    16151615        printMessage(" 0x%02x : %s\n", (*it).second, (*it).first.c_str()); 
    16161616    } 
    16171617    printMessage("Router destinations:\n"); 
    1618     printMessage(" %ld destinations:\n", m_destinations.size()); 
     1618    printMessage(" %llu destinations:\n", (unsigned long long)m_destinations.size()); 
    16191619    for ( std::map<std::string, int>::iterator it=m_destinations.begin(); it!=m_destinations.end(); ++it ) { 
    16201620        printMessage(" 0x%02x : %s\n", (*it).second, (*it).first.c_str()); 
     
    17991799EAP::RouterConfig::show() 
    18001800{ 
    1801     printMessage("%ld routes\n", m_routes2.size()); 
     1801    printMessage("%llu routes\n", (unsigned long long)m_routes2.size()); 
    18021802    for ( RouteVectorV2::iterator it=m_routes2.begin(); it!=m_routes2.end(); ++it ) { 
    18031803        printMessage("0x%02x -> 0x%02x\n", it->second, it->first);