[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdevelop] debuggers/gdb: fix warning for some newer gcc versions
From:       Niko Sams <niko.sams () gmail ! com>
Date:       2012-11-27 6:45:56
Message-ID: 20121127064556.E328FA6091 () git ! kde ! org
[Download RAW message or body]

Git commit 0b86032be8838615c2c064b49dabf58fb86e6b4f by Niko Sams.
Committed on 27/11/2012 at 07:47.
Pushed by nsams into branch 'master'.

fix warning for some newer gcc versions

seems gcc isn't smart enough to track back the value of end

M  +2    -3    debuggers/gdb/stty.cpp

http://commits.kde.org/kdevelop/0b86032be8838615c2c064b49dabf58fb86e6b4f

diff --git a/debuggers/gdb/stty.cpp b/debuggers/gdb/stty.cpp
index 3b812ab..8eeee4b 100644
--- a/debuggers/gdb/stty.cpp
+++ b/debuggers/gdb/stty.cpp
@@ -324,7 +324,6 @@ bool STTY::findExternalTTY(const QString &termApp)
                     "exec<&-;exec>&-;"		        // close stdin and stdout
                     "while :;do sleep 3600;done");
         const char* scriptStr = script.toLatin1();
-        const char* end       = 0;
 
         QByteArray rawAppName = appName.toLocal8Bit();
         if ( termApp == "konsole" )
@@ -333,14 +332,14 @@ bool STTY::findExternalTTY(const QString &termApp)
                   "-caption", i18n("kdevelop: Debug application console").toLocal8Bit().data(),
                   "-e",       "sh",
                   "-c",       scriptStr,
-                      end);
+                  (char *)0);
         }
         else
         {        
             ::execlp( rawAppName, rawAppName,
                   "-e",       "sh",
                   "-c",       scriptStr,
-                  end);
+                  (char *)0);
         }
 
         // Should not get here, as above should always work
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic