Changeset 140636 for trunk/base


Ignore:
Timestamp:
Sep 28, 2015, 8:33:13 PM (5 years ago)
Author:
cal@…
Message:

base: tracelib: Cleanup printf format specifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/pextlib1.0/tracelib.c

    r138939 r140636  
    66 *
    77 * Copyright (c) 2007-2008 Eugene Pimenov (GSoC)
    8  * Copyright (c) 2008-2010, 2012-2013 The MacPorts Project
     8 * Copyright (c) 2008-2010, 2012-2013, 2014-2015 The MacPorts Project
    99 * All rights reserved.
    1010 *
     
    4040#include <errno.h>
    4141#include <fcntl.h>
     42#include <inttypes.h>
    4243#include <limits.h>
    4344#include <pthread.h>
     
    304305            /* this usually means the socket was closed by the remote side */
    305306        } else {
    306             fprintf(stderr, "tracelib: partial data received: expected %ld, but got %ld on socket %d\n", (unsigned long) sizeof(len), (unsigned long) ret, sock);
     307            fprintf(stderr, "tracelib: partial data received: expected %zu, but got %zd on socket %d\n", sizeof(len), ret, sock);
    307308        }
    308309        return 0;
     
    310311
    311312    if (len > BUFSIZE - 1) {
    312         fprintf(stderr, "tracelib: transfer too large: %ld bytes sent, but buffer holds %d on socket %d\n", (unsigned long) len, (int) (BUFSIZE - 1), sock);
     313        fprintf(stderr, "tracelib: transfer too large: %" PRIu32 " bytes sent, but buffer holds %d on socket %d\n", len, BUFSIZE - 1, sock);
    313314        return 0;
    314315    }
     
    318319            perror("tracelib: recv");
    319320        } else {
    320             fprintf(stderr, "tracelib: partial data received: expected %ld, but got %ld on socket %d\n", (unsigned long) len, (unsigned long) ret, sock);
     321            fprintf(stderr, "tracelib: partial data received: expected %" PRIu32 ", but got %zd on socket %d\n", len, ret, sock);
    321322        }
    322323        return 0;
Note: See TracChangeset for help on using the changeset viewer.