[Chinese-commits] [fqterm] 44/76: Silence some warnings

Boyuan Yang hosiet-guest at moszumanska.debian.org
Thu Oct 27 03:17:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

hosiet-guest pushed a commit to branch master
in repository fqterm.

commit 74383624ec49680fa1f24294c2707ca7e0c38ba4
Author: Iru Cai <mytbk920423 at gmail.com>
Date:   Sat Jun 21 12:02:16 2014 +0800

    Silence some warnings
---
 src/common/fqterm_trace.cpp             | 2 +-
 src/fqterm/3rdparty/uaocodec.cpp        | 4 ++--
 src/terminal/internal/fqterm_telnet.cpp | 2 +-
 src/unite/internal/state.cpp            | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/common/fqterm_trace.cpp b/src/common/fqterm_trace.cpp
index b08d8d0..ef0a808 100644
--- a/src/common/fqterm_trace.cpp
+++ b/src/common/fqterm_trace.cpp
@@ -50,7 +50,7 @@ void setMaxTraceLevel(int max_trace_level) {
 #ifdef _MSC_VER
 typedef stdext::hash_set<std::string> CategorySet;
 #else
-typedef typename std::set<std::string> CategorySet;
+typedef std::set<std::string> CategorySet;
 #endif
 
 CategorySet *getAllowedCategories() {
diff --git a/src/fqterm/3rdparty/uaocodec.cpp b/src/fqterm/3rdparty/uaocodec.cpp
index 2e70b78..64c411d 100644
--- a/src/fqterm/3rdparty/uaocodec.cpp
+++ b/src/fqterm/3rdparty/uaocodec.cpp
@@ -2485,7 +2485,7 @@ static const ushort big5_to_ucs[] =
 33325, 33326, 33342, 33378, 33386, 33416
 };
 
-static const uchar ucs_to_big5[][2] =
+static const char ucs_to_big5[][2] =
 {
     {'\x00','\x00'},{'\x00','\x01'},{'\x00','\x02'},{'\x00','\x03'},{'\x00','\x04'},
     {'\x00','\x05'},{'\x00','\x06'},{'\x00','\x07'},{'\x00','\x08'},{'\x00','\x09'},
@@ -15632,7 +15632,7 @@ static int qt_UnicodeToBig5(uint wc, uchar *r)
     }
     else {
         if (wc >= 0 && wc <= 65535){
-            c = ucs_to_big5[wc];
+            c = (uchar*)ucs_to_big5[wc];
             if (c [0] == '\0')
                 return 0;
             if (c [1] != 0) {
diff --git a/src/terminal/internal/fqterm_telnet.cpp b/src/terminal/internal/fqterm_telnet.cpp
index ba5d349..a561f1e 100644
--- a/src/terminal/internal/fqterm_telnet.cpp
+++ b/src/terminal/internal/fqterm_telnet.cpp
@@ -188,7 +188,7 @@ FQTermTelnet::FQTermTelnet(const QString &strTermType, int rows, int columns,
       hostType_(hostType),
       protocolType_(protocolType) {
   term = new char[21];
-  memset(term, 0, sizeof(term));
+  memset(term, 0, 21*sizeof(char));
   // TODO: clean up, need???
 #ifdef WIN32
   _snprintf(term, sizeof(term), "%s", strTermType.toLatin1().constData());
diff --git a/src/unite/internal/state.cpp b/src/unite/internal/state.cpp
index 39241b0..7d1c956 100644
--- a/src/unite/internal/state.cpp
+++ b/src/unite/internal/state.cpp
@@ -157,7 +157,7 @@ int FQTermUniteDecode::processInput(const QByteArray& input) {
 
     lastState = current_state_ + i; 
 
-    bool stopDecode;
+    bool stopDecode=false;
     if (lastState->action != 0) {
       stopDecode = (this->*(lastState->action))();
     } 
@@ -673,4 +673,4 @@ void FQTermHelpState::drawPointer(int index) {
 
 } // namespace FQTerm
 
-#include "state.moc"
\ No newline at end of file
+#include "state.moc"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/fqterm.git



More information about the Chinese-commits mailing list