Show
Ignore:
Timestamp:
07/02/08 23:03:31 (5 months ago)
Author:
flynd
Message:

Fixed some cast warnings found while trying to compile on bsd.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/pthread_rdwr.c

    r5650 r6400  
    7070  int i; 
    7171 
    72   fprintf(file, 
    73           "Possible deadlock for thread %d (0x%x) trying to get a %s lock on '%s'\n", 
    74           (int)pthread_self(), (unsigned int)pthread_self(), 
    75           (reading ? "read" : "write"), rdwrp->name); 
     72  fprintf(file, "Possible deadlock for thread %p trying to get a %s lock on '%s'\n", 
     73      (void*)pthread_self(), (reading ? "read" : "write"), rdwrp->name); 
    7674 
    7775  if (rdwrp->writer_writing > 0) 
    7876  { 
    79     fprintf(file, "Thread %d (0x%x) holds the write lock\n", 
    80             (int)rdwrp->writer, (unsigned int)rdwrp->writer); 
     77    fprintf(file, "Thread %p holds the write lock\n", (void*)rdwrp->writer); 
    8178  } 
    8279  else 
     
    8885    for (i = 0; i < rdwrp->readers_reading; ++i) 
    8986    { 
    90       fprintf(file, 
    91               " %d (0x%x)", 
    92               (int)rdwrp->readers[i], (unsigned int)rdwrp->readers[i]); 
     87      fprintf(file, " %p", (void*)rdwrp->readers[i]); 
    9388    } 
    9489    fprintf(file, "\n"); 
     
    119114    if (file != NULL) 
    120115    { 
    121       fprintf(file, "time: %lu\n", time(NULL)); 
     116      fprintf(file, "time: %lu\n", (long)time(NULL)); 
    122117      print_users(file, rdwrp, reading); 
    123118      fclose(file);