Ignore:
Timestamp:
Sep 30, 2017, 2:52:35 PM (8 years ago)
Author:
bird
Message:

misc gcc warning fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/err.c

    r2911 r3065  
    5555    char szMsg[4096];
    5656    int cchMsg = snprintf(szMsg, sizeof(szMsg), "%s: ", g_progname);
    57     if (cchMsg < sizeof(szMsg) - 1 && cchMsg > 0)
     57    if (cchMsg < (int)sizeof(szMsg) - 1 && cchMsg > 0)
    5858    {
    5959        int cchMsg2;
     
    6262        va_end(args);
    6363
    64         if (   cchMsg < sizeof(szMsg) - 1
     64        if (   cchMsg < (int)sizeof(szMsg) - 1
    6565            && cchMsg2 >= 0)
    6666        {
    6767            cchMsg += cchMsg2 = snprintf(&szMsg[cchMsg], sizeof(szMsg) - cchMsg, ": %s\n", strerror(error));
    68             if (   cchMsg < sizeof(szMsg) - 1
     68            if (   cchMsg < (int)sizeof(szMsg) - 1
    6969                && cchMsg2 >= 0)
    7070            {
     
    9696    char szMsg[4096];
    9797    int cchMsg = snprintf(szMsg, sizeof(szMsg), "%s: ", g_progname);
    98     if (cchMsg < sizeof(szMsg) - 1 && cchMsg > 0)
     98    if (cchMsg < (int)sizeof(szMsg) - 1 && cchMsg > 0)
    9999    {
    100100        int cchMsg2;
     
    103103        va_end(args);
    104104
    105         if (   cchMsg < sizeof(szMsg) - 1
     105        if (   cchMsg < (int)sizeof(szMsg) - 1
    106106            && cchMsg2 >= 0)
    107107        {
     
    132132    char szMsg[4096];
    133133    int cchMsg = snprintf(szMsg, sizeof(szMsg), "%s: ", g_progname);
    134     if (cchMsg < sizeof(szMsg) - 1 && cchMsg > 0)
     134    if (cchMsg < (int)sizeof(szMsg) - 1 && cchMsg > 0)
    135135    {
    136136        int cchMsg2;
     
    139139        va_end(args);
    140140
    141         if (   cchMsg < sizeof(szMsg) - 1
     141        if (   cchMsg < (int)sizeof(szMsg) - 1
    142142            && cchMsg2 >= 0)
    143143        {
    144144            cchMsg += cchMsg2 = snprintf(&szMsg[cchMsg], sizeof(szMsg) - cchMsg, ": %s\n", strerror(error));
    145             if (   cchMsg < sizeof(szMsg) - 1
     145            if (   cchMsg < (int)sizeof(szMsg) - 1
    146146                && cchMsg2 >= 0)
    147147            {
     
    169169    char szMsg[4096];
    170170    int cchMsg = snprintf(szMsg, sizeof(szMsg), "%s: ", g_progname);
    171     if (cchMsg < sizeof(szMsg) - 1 && cchMsg > 0)
     171    if (cchMsg < (int)sizeof(szMsg) - 1 && cchMsg > 0)
    172172    {
    173173        int cchMsg2;
     
    176176        va_end(args);
    177177
    178         if (   cchMsg < sizeof(szMsg) - 1
     178        if (   cchMsg < (int)sizeof(szMsg) - 1
    179179            && cchMsg2 >= 0)
    180180        {
Note: See TracChangeset for help on using the changeset viewer.