@@ -193,7 +193,7 @@ struct ext_table_t
193193};
194194
195195
196- static const ext_table_t dml_ext_table[] =
196+ static constexpr ext_table_t dml_ext_table[] =
197197{
198198 { lang_c, IN_SW_GPRE_C, " .e" , " .c" },
199199
@@ -234,13 +234,13 @@ static const ext_table_t dml_ext_table[] =
234234 { lang_undef, IN_SW_GPRE_0, NULL , NULL }
235235};
236236
237- const UCHAR CHR_LETTER = 1 ;
238- const UCHAR CHR_DIGIT = 2 ;
239- const UCHAR CHR_IDENT = 4 ;
240- const UCHAR CHR_QUOTE = 8 ;
241- const UCHAR CHR_WHITE = 16 ;
242- const UCHAR CHR_INTRODUCER = 32 ;
243- const UCHAR CHR_DBLQUOTE = 64 ;
237+ constexpr UCHAR CHR_LETTER = 1 ;
238+ constexpr UCHAR CHR_DIGIT = 2 ;
239+ constexpr UCHAR CHR_IDENT = 4 ;
240+ constexpr UCHAR CHR_QUOTE = 8 ;
241+ constexpr UCHAR CHR_WHITE = 16 ;
242+ constexpr UCHAR CHR_INTRODUCER = 32 ;
243+ constexpr UCHAR CHR_DBLQUOTE = 64 ;
244244
245245
246246static void atexit_fb_shutdown ()
@@ -891,7 +891,7 @@ int main(int argc, char* argv[])
891891// Abort this silly program.
892892//
893893
894- void CPR_abort ()
894+ [[noreturn]] void CPR_abort ()
895895{
896896 ++fatals_global;
897897 // throw Firebird::Exception();
@@ -905,11 +905,11 @@ void CPR_abort()
905905// Report an assertion failure and abort this silly program.
906906//
907907
908- void CPR_assert (const TEXT* file, int line)
908+ [[noreturn]] void CPR_assert (const TEXT* file, int line)
909909{
910910 TEXT buffer[MAXPATHLEN << 1 ];
911911
912- fb_utils:: snprintf (buffer, sizeof (buffer),
912+ snprintf (buffer, sizeof (buffer),
913913 " GPRE assertion failure file '%s' line '%d'" , file, line);
914914 CPR_bugcheck (buffer);
915915}
@@ -921,7 +921,7 @@ void CPR_assert(const TEXT* file, int line)
921921// Issue an error message.
922922//
923923
924- void CPR_bugcheck (const TEXT* string)
924+ [[noreturn]] void CPR_bugcheck (const TEXT* string)
925925{
926926 fprintf (stderr, " *** INTERNAL BUGCHECK: %s ***\n " , string);
927927 MET_fini (0 );
@@ -959,7 +959,7 @@ int CPR_error(const TEXT* string)
959959// Exit with status.
960960//
961961
962- void CPR_exit ( int stat)
962+ [[noreturn]] void CPR_exit ( int stat)
963963{
964964#ifdef LINUX
965965
@@ -1137,12 +1137,12 @@ void CPR_get_text( TEXT* buffer, const gpre_txt* text)
11371137// Generate a syntax error.
11381138//
11391139
1140- void CPR_s_error (const TEXT* string)
1140+ [[noreturn]] void CPR_s_error (const TEXT* string)
11411141{
11421142 TEXT s[512 ];
11431143
1144- fb_utils:: snprintf (s, sizeof (s),
1145- " expected %s, encountered \" %s\" " , string, gpreGlob.token_global .tok_string );
1144+ snprintf (s, sizeof (s),
1145+ " expected %s, encountered \" %s\" " , string, gpreGlob.token_global .tok_string );
11461146 CPR_error (s);
11471147 PAR_unwind ();
11481148}
0 commit comments