Fix various new compiler warnings.

terminalfunctions.cc: set_if_available() was undeclared.
Fix printf() wint_t/wchar_t warnings.
mosh-server.cc: Fix warning for side effects inside typeid().

Signed-off-by: John Hood <cgull@glup.org>
This commit is contained in:
John Hood
2015-06-05 23:35:18 -04:00
parent b604a7d7c2
commit 543f346ac7
6 changed files with 11 additions and 10 deletions
+4 -4
View File
@@ -81,7 +81,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
for ( std::deque<wchar_t>::const_iterator i = window_title.begin();
i != window_title.end();
i++ ) {
snprintf( tmp, 64, "%lc", *i );
snprintf( tmp, 64, "%lc", (wint_t)*i );
frame.append( tmp );
}
frame.append( "\007" );
@@ -93,7 +93,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
for ( std::deque<wchar_t>::const_iterator i = icon_name.begin();
i != icon_name.end();
i++ ) {
snprintf( tmp, 64, "%lc", *i );
snprintf( tmp, 64, "%lc", (wint_t)*i );
frame.append( tmp );
}
frame.append( "\007" );
@@ -103,7 +103,7 @@ std::string Display::new_frame( bool initialized, const Framebuffer &last, const
for ( std::deque<wchar_t>::const_iterator i = window_title.begin();
i != window_title.end();
i++ ) {
snprintf( tmp, 64, "%lc", *i );
snprintf( tmp, 64, "%lc", (wint_t)*i );
frame.append( tmp );
}
frame.append( "\007" );
@@ -421,7 +421,7 @@ void Display::put_cell( bool initialized, FrameState &frame, const Framebuffer &
for ( std::vector<wchar_t>::const_iterator i = cell->contents.begin();
i != cell->contents.end();
i++ ) {
snprintf( tmp, 64, "%lc", *i );
snprintf( tmp, 64, "%lc", (wint_t)*i );
frame.append( tmp );
}