Changeset e4b055a5ccd8c0c463d608e0cdbdbf14367f21d1

Show
Ignore:
Timestamp:
02/08/08 16:04:44 (6 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1202486684 +0000
git-parent:

[102a1a9c6d6dab4f2721c835c8728a0a33731e85]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1202486684 +0000
Message:

no functional changes, just remove compiler warnings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.in

    r81ac86a re4b055a  
    4444AC_CHECK_HEADERS(sys/file.h sys/types.h dirent.h sys/param.h fcntl.h errno.h limits.h \ 
    4545                 sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \ 
    46                  ctype.h unistd.h time.h sys/stat.h
     46                 ctype.h unistd.h time.h sys/stat.h sys/time.h unistd.h sys/mman.h
    4747 
    4848AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ 
  • jlog.c

    r9b8a62c re4b055a  
    7171#include "jlog_config.h" 
    7272#include "jlog_private.h" 
     73#if HAVE_UNISTD_H 
     74#include <unistd.h> 
     75#endif 
     76#if HAVE_SYS_TIME_H 
     77#include <sys/time.h> 
     78#endif 
    7379#if HAVE_DIRENT_H 
    7480#include <dirent.h> 
     
    8288#if HAVE_TIME_H 
    8389#include <time.h> 
     90#endif 
     91#if HAVE_SYS_MMAN_H 
     92#include <sys/mman.h> 
    8493#endif 
    8594 
     
    105114{ 
    106115  jlog_message_header hdr; 
    107   char *this, *next, *afternext, *mmap_end; 
     116  char *this, *next, *afternext = NULL, *mmap_end; 
    108117  int i, invalid_count = 0; 
    109118  struct { 
     
    248257    if (hdr.reserved != 0) { 
    249258      fprintf(stderr, "Message %d at [%ld] has invalid reserved value %u\n", 
    250               i, this - (char *)ctx->mmap_base, hdr.reserved); 
     259              i, (long int)(this - (char *)ctx->mmap_base), hdr.reserved); 
    251260      return 1; 
    252261    } 
    253262 
    254263    fprintf(stderr, "Message %d at [%ld] of (%lu+%u)", i,  
    255             this - (char *)ctx->mmap_base, sizeof(hdr), hdr.mlen); 
     264            (long int)(this - (char *)ctx->mmap_base), sizeof(hdr), hdr.mlen); 
    256265 
    257266    next = this + sizeof(hdr) + hdr.mlen; 
     
    272281  } 
    273282  if (this < mmap_end) { 
    274     fprintf(stderr, "%ld bytes of junk at the end\n", mmap_end - this); 
     283    fprintf(stderr, "%ld bytes of junk at the end\n", 
     284            (long int)(mmap_end - this)); 
    275285    return 1; 
    276286  } 
  • jlog_config.h.in

    r11b0ad9 re4b055a  
    4343#undef HAVE_STRING_H 
    4444#undef HAVE_STDLIB_H 
     45#undef HAVE_UNISTD_H 
    4546#undef HAVE_SYS_PARAM_H 
     47#undef HAVE_SYS_MMAN_H 
    4648#undef HAVE_TIME_H 
     49#undef HAVE_SYS_TIME_H 
    4750#undef HAVE_SYS_STAT_H 
    4851#undef HAVE_INT64_T 
  • jlogctl.c

    r9b8a62c re4b055a  
    3535#include "getopt_long.h" 
    3636#include <stdio.h> 
     37#if HAVE_UNISTD_H 
     38#include <unistd.h> 
     39#endif 
    3740#if HAVE_ERRNO_H 
    3841#include <errno.h> 
  • jthreadtest.c

    r11b0ad9 re4b055a  
    3333#include <stdio.h> 
    3434#include <pthread.h> 
     35#include <unistd.h> 
    3536 
    3637#include "jlog_config.h"