File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,9 @@ enum _oursqlx_exception_type _oursqlx_exc_from_errno(int err) {
618618
619619 default :
620620 #if MYSQL_VERSION_ID >= 50700
621- for (unsigned int i = 0 ; i < sizeof (errmsg_section_start )/sizeof (int ); ++ i ) {
621+ {
622+ unsigned int i ;
623+ for (i = 0 ; i < sizeof (errmsg_section_start )/sizeof (int ); ++ i ) {
622624 int min = errmsg_section_start [i ];
623625 int max = errmsg_section_start [i ] + errmsg_section_size [i ] - 1 ;
624626 if ( err >= min && err <= max ) {
@@ -628,6 +630,7 @@ enum _oursqlx_exception_type _oursqlx_exc_from_errno(int err) {
628630 if ( err > CR_MIN_ERROR && err < CR_MAX_ERROR ) {
629631 return _oursqlx_InterfaceError ;
630632 }
633+ }
631634 #else
632635 if (err >= ER_ERROR_FIRST && err <= ER_ERROR_LAST )
633636 return _oursqlx_ProgrammingError ;
You can’t perform that action at this time.
0 commit comments