Changeset 3065 for trunk/src/kmk/kmkbuiltin/err.c
- Timestamp:
- Sep 30, 2017, 2:52:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/kmkbuiltin/err.c
r2911 r3065 55 55 char szMsg[4096]; 56 56 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) 58 58 { 59 59 int cchMsg2; … … 62 62 va_end(args); 63 63 64 if ( cchMsg < sizeof(szMsg) - 164 if ( cchMsg < (int)sizeof(szMsg) - 1 65 65 && cchMsg2 >= 0) 66 66 { 67 67 cchMsg += cchMsg2 = snprintf(&szMsg[cchMsg], sizeof(szMsg) - cchMsg, ": %s\n", strerror(error)); 68 if ( cchMsg < sizeof(szMsg) - 168 if ( cchMsg < (int)sizeof(szMsg) - 1 69 69 && cchMsg2 >= 0) 70 70 { … … 96 96 char szMsg[4096]; 97 97 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) 99 99 { 100 100 int cchMsg2; … … 103 103 va_end(args); 104 104 105 if ( cchMsg < sizeof(szMsg) - 1105 if ( cchMsg < (int)sizeof(szMsg) - 1 106 106 && cchMsg2 >= 0) 107 107 { … … 132 132 char szMsg[4096]; 133 133 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) 135 135 { 136 136 int cchMsg2; … … 139 139 va_end(args); 140 140 141 if ( cchMsg < sizeof(szMsg) - 1141 if ( cchMsg < (int)sizeof(szMsg) - 1 142 142 && cchMsg2 >= 0) 143 143 { 144 144 cchMsg += cchMsg2 = snprintf(&szMsg[cchMsg], sizeof(szMsg) - cchMsg, ": %s\n", strerror(error)); 145 if ( cchMsg < sizeof(szMsg) - 1145 if ( cchMsg < (int)sizeof(szMsg) - 1 146 146 && cchMsg2 >= 0) 147 147 { … … 169 169 char szMsg[4096]; 170 170 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) 172 172 { 173 173 int cchMsg2; … … 176 176 va_end(args); 177 177 178 if ( cchMsg < sizeof(szMsg) - 1178 if ( cchMsg < (int)sizeof(szMsg) - 1 179 179 && cchMsg2 >= 0) 180 180 {
Note:
See TracChangeset
for help on using the changeset viewer.