VirtualBox

Changeset 2001 in kBuild


Ignore:
Timestamp:
Oct 29, 2008 10:14:48 PM (16 years ago)
Author:
bird
Message:

kmk: pedantic warnings.

Location:
trunk/src/kmk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/electric.c

    r1453 r2001  
    5454  fprintf (stderr, "electric heap error: %s (errno=%d)\n", msg, errno);
    5555  __asm__ ("int3"); /* not portable... */
    56 #endif 
     56#endif
    5757  abort ();
    5858  exit (1);
     
    188188}
    189189
    190 #endif /* ELECTRIC_HEAP */
     190#else /* !ELECTRIC_HEAP */
     191extern void electric_heap_keep_ansi_c_quiet (void);
     192#endif /* !ELECTRIC_HEAP */
    191193
  • trunk/src/kmk/filedef.h

    r1995 r2001  
    210210#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
    211211#if FILE_TIMESTAMP_HI_RES == 0 /* bird: shut up annoying warnings!
    212   ASSUMES: unsinged FILE_TIMESTAMP ++. */
    213 # define ORDINARY_MTIME_MAX  ( ~ (FILE_TIMESTAMP) 0 )
     212  ASSUMES: unsigned FILE_TIMESTAMP ++. */
     213# define ORDINARY_MTIME_MAX     ( ~ (FILE_TIMESTAMP) 0 )
    214214#else
    215215#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
     
    224224   targets, which need to be considered newer than anything that depends on
    225225   them, even if said dependents' modtimes are in the future.  */
     226#if 1 /* bird: ASSUME the type is unsigned and the wrath of a pedantic gcc.  */
     227# define NEW_MTIME              ( ~ (FILE_TIMESTAMP) 0 )
     228#else
    226229#define NEW_MTIME INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
     230#endif
    227231
    228232#define check_renamed(file) \
  • trunk/src/kmk/glob/glob.c

    r1993 r2001  
    390390          /* Allocate working buffer large enough for our work.  Note that
    391391            we have at least an opening and closing brace.  */
    392           int firstc;
     392          size_t firstc;
    393393          char *alt_start;
    394394          const char *p;
  • trunk/src/kmk/implicit.c

    r1993 r2001  
    117117
    118118  if (c == '\0')
    119     return 0;
     119    {
     120      if (length)   /* bird: shut up gcc. */
     121        *length = 0;
     122      return 0;
     123    }
    120124
    121125
  • trunk/src/kmk/job.c

    r1996 r2001  
    21032103        {
    21042104          DB (DB_KMK, (_("not_parallel %d -> %d (file=%p `%s') [start_waiting_jobs]\n"),
    2105                        not_parallel, not_parallel - 1, job->file, job->file->name));
     2105                       not_parallel, not_parallel - 1, (void *) job->file, job->file->name));
    21062106          assert(not_parallel > 0);
    21072107          --not_parallel;
  • trunk/src/kmk/kmkbuiltin/err.c

    r785 r2001  
    7575void warnx(const char *fmt, ...)
    7676{
    77     int err = errno;
    7877    va_list args;
    7978    fprintf(stderr, "%s: ", g_progname);
  • trunk/src/kmk/kmkbuiltin/kbuild_protection.c

    r1635 r2001  
    3737# include <limits.h>
    3838# include <direct.h>
    39 #endif
     39#else
     40# include <unistd.h>
     41#endif
    4042#include "kbuild_protection.h"
     43#include "err.h"
    4144
    4245
     
    185188        }
    186189    }
    187 #else
     190#else  /* !WIN && !OS2 */
    188191    if (!IS_SLASH(pszPath[0]))
    189192    {
     
    199202        cComponents = countSubPathComponents(szCwd, 0);
    200203    }
    201 #endif
     204#endif /* !WIN && !OS2 */
    202205
    203206    /*
     
    352355        if (cComponents < 0)
    353356            return -1;
    354         if (cComponents <= pThis->cProtectionDepth)
     357        if ((unsigned int)cComponents <= pThis->cProtectionDepth)
    355358        {
    356359            errx(1, "%s: protected", pszPath);
  • trunk/src/kmk/kmkbuiltin/kbuild_protection.h

    r1598 r2001  
    4646typedef struct KBUILDPROTECTION
    4747{
    48     unsigned        uMagic;
    49     unsigned        cProtectionDepth;
     48    unsigned int    uMagic;
     49    unsigned int    cProtectionDepth;
    5050    unsigned char   afTypes[KBUILDPROTECTIONTYPE_MAX];
    5151} KBUILDPROTECTION;
  • trunk/src/kmk/kmkbuiltin/setmode.c

    r1710 r2001  
    396396        case 'X':
    397397                set->cmd = op;
    398                 set->bits = (who ? who : mask) & oparg;
     398                set->bits = (who ? (mode_t)who : mask) & oparg;
    399399                break;
    400400
  • trunk/src/kmk/remake.c

    r1994 r2001  
    902902  int touched = 0;
    903903  DB (DB_JOBS, (_("notice_finished_file - entering: file=%p `%s' update_status=%d command_state=%d\n"), /* bird */
    904                   file, file->name, file->update_status, file->command_state));
     904                  (void *) file, file->name, file->update_status, file->command_state));
    905905
    906906  file->command_state = cs_finished;
     
    925925    {
    926926      DB (DB_KMK, (_("not_parallel %d -> %d (file=%p `%s') [notice_finished_file]\n"), not_parallel,
    927                    not_parallel - 1, file, file->name));
     927                   not_parallel - 1, (void *) file, file->name));
    928928      assert(not_parallel >= 1);
    929929      --not_parallel;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette