Changeset 40551
- Timestamp:
- Oct 20, 2018, 9:08:56 PM (8 years ago)
- Location:
- trunk/psLib/src/sys
- Files:
-
- 2 edited
-
psString.c (modified) (1 diff)
-
psString.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.c
r31152 r40551 496 496 } 497 497 498 // several snprintf statements below my truncate their output 499 // gcc (since 8.1) warns if the output may be truncated. 500 // the following NOOP function is used to fool the compiler 501 // see ps_snprintf_nowarn in psString.h 502 void psNOOP (void) { } -
trunk/psLib/src/sys/psString.h
r31152 r40551 40 40 #define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__) 41 41 42 // gcc (since 8.1) warns if the output may be truncated by snprint. 43 // since that is sometimes a desired behavior, this version of snprintf 44 // is defined to fool the compiler about this warning: 45 // the following NOOP function is used to fool the compiler 46 // see snprintf_nowarn in ohana.h 47 #define ps_snprintf_nowarn(...) (snprintf(__VA_ARGS__) < 0 ? psNOOP() : 0) 48 void psNOOP (void); 49 50 // some constants to use in snprintf statements and variable definitions to ensure 51 // consistency 52 # define PS_SMALLWORD 16 53 # define PS_BIGWORD 128 54 42 55 /** Allocates a new psString. 43 56 *
Note:
See TracChangeset
for help on using the changeset viewer.
