Remove various assert(constant) calls
These cause warnings from static checkers, and seem to lead to spurious GCC7 -Wmaybe-uninitialized.
This commit is contained in:
@@ -126,7 +126,6 @@ Validity ConditionalCursorMove::get_validity( const Framebuffer &fb,
|
|||||||
|
|
||||||
if ( (row >= fb.ds.get_height())
|
if ( (row >= fb.ds.get_height())
|
||||||
|| (col >= fb.ds.get_width()) ) {
|
|| (col >= fb.ds.get_width()) ) {
|
||||||
// assert( false );
|
|
||||||
// fprintf( stderr, "Crazy cursor (%d,%d)!\n", row, col );
|
// fprintf( stderr, "Crazy cursor (%d,%d)!\n", row, col );
|
||||||
return IncorrectOrExpired;
|
return IncorrectOrExpired;
|
||||||
}
|
}
|
||||||
@@ -299,9 +298,8 @@ void NotificationEngine::apply( Framebuffer &fb ) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1: /* unprintable character */
|
case -1: /* unprintable character */
|
||||||
|
default: /* Bogus width, ignore. */
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
assert( false );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,6 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
|
|||||||
throw; /* this time it's fatal */
|
throw; /* this time it's fatal */
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( false );
|
|
||||||
throw NetworkException( "Could not bind", errno );
|
throw NetworkException( "Could not bind", errno );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,7 +351,6 @@ bool Connection::try_bind( const char *addr, int port_low, int port_high )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert( false );
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,7 +456,6 @@ string Connection::recv( void )
|
|||||||
prune_sockets();
|
prune_sockets();
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
assert( false );
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ string UserStream::diff_from( const UserStream &existing ) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert( false );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +130,6 @@ const Parser::Action &UserStream::get_action( unsigned int i ) const
|
|||||||
case ResizeType:
|
case ResizeType:
|
||||||
return actions[ i ].resize;
|
return actions[ i ].resize;
|
||||||
default:
|
default:
|
||||||
assert( false );
|
|
||||||
static const Parser::Ignore nothing = Parser::Ignore();
|
static const Parser::Ignore nothing = Parser::Ignore();
|
||||||
return nothing;
|
return nothing;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace Network {
|
|||||||
/* interface for Network::Transport */
|
/* interface for Network::Transport */
|
||||||
void subtract( const UserStream *prefix );
|
void subtract( const UserStream *prefix );
|
||||||
string diff_from( const UserStream &existing ) const;
|
string diff_from( const UserStream &existing ) const;
|
||||||
string init_diff( void ) const { assert( false ); return string(); };
|
string init_diff( void ) const { return string(); };
|
||||||
void apply_string( const string &diff );
|
void apply_string( const string &diff );
|
||||||
bool operator==( const UserStream &x ) const { return actions == x.actions; }
|
bool operator==( const UserStream &x ) const { return actions == x.actions; }
|
||||||
|
|
||||||
|
|||||||
@@ -140,9 +140,7 @@ void Emulator::print( const Parser::Print *act )
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1: /* unprintable character */
|
case -1: /* unprintable character */
|
||||||
break;
|
default: /* bogus width, ignore */
|
||||||
default:
|
|
||||||
assert( false );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ string UserInput::input( const Parser::UserByte *act,
|
|||||||
default:
|
default:
|
||||||
/* This doesn't handle the 8-bit SS3 C1 control, which would be
|
/* This doesn't handle the 8-bit SS3 C1 control, which would be
|
||||||
two octets in UTF-8. Fortunately nobody seems to send this. */
|
two octets in UTF-8. Fortunately nobody seems to send this. */
|
||||||
assert( false );
|
|
||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ int main( int argc, char *argv[] ) {
|
|||||||
} catch ( const CryptoException &e ) {
|
} catch ( const CryptoException &e ) {
|
||||||
fprintf( stderr, "Crypto exception: %s\r\n",
|
fprintf( stderr, "Crypto exception: %s\r\n",
|
||||||
e.what() );
|
e.what() );
|
||||||
fatal_assert( false );
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user