mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
public: mark some functions as never returning nullptr
This commit is contained in:
parent
534adc9630
commit
b51d1a4e2e
@ -320,7 +320,9 @@ const char* Q_timestamp( int format )
|
||||
// Build a timestamp that can use for filename (ex: "Nov2006-26 (19.14.28)");
|
||||
strftime( timestamp, sizeof( timestamp ), "%b%Y-%d_%H.%M.%S", crt_tm );
|
||||
break;
|
||||
default: return NULL;
|
||||
default:
|
||||
Q_snprintf( timestamp, sizeof( timestamp ), "%s: unknown format %d", __func__, format );
|
||||
break;
|
||||
}
|
||||
|
||||
return timestamp;
|
||||
|
@ -78,7 +78,7 @@ qboolean Q_stricmpext( const char *pattern, const char *text );
|
||||
qboolean Q_strnicmpext( const char *pattern, const char *text, size_t minimumlen );
|
||||
const byte *Q_memmem( const byte *haystack, size_t haystacklen, const byte *needle, size_t needlelen );
|
||||
void Q_memor( byte *XASH_RESTRICT dst, const byte *XASH_RESTRICT src, size_t len );
|
||||
const char *Q_timestamp( int format );
|
||||
const char *Q_timestamp( int format ) RETURNS_NONNULL;
|
||||
int Q_vsnprintf( char *buffer, size_t buffersize, const char *format, va_list args );
|
||||
int Q_snprintf( char *buffer, size_t buffersize, const char *format, ... ) FORMAT_CHECK( 3 );
|
||||
#define Q_strpbrk strpbrk
|
||||
@ -86,7 +86,7 @@ void COM_StripColors( const char *in, char *out );
|
||||
#define Q_memprint( val ) Q_pretifymem( val, 2 )
|
||||
char *Q_pretifymem( float value, int digitsafterdecimal );
|
||||
void COM_FileBase( const char *in, char *out, size_t size );
|
||||
const char *COM_FileExtension( const char *in );
|
||||
const char *COM_FileExtension( const char *in ) RETURNS_NONNULL;
|
||||
void COM_DefaultExtension( char *path, const char *extension, size_t size );
|
||||
void COM_ReplaceExtension( char *path, const char *extension, size_t size );
|
||||
void COM_ExtractFilePath( const char *path, char *dest );
|
||||
|
Loading…
Reference in New Issue
Block a user