]> git.tdb.fi Git - builder.git/commitdiff
Add missing includes
authorMikko Rasa <tdb@tdb.fi>
Tue, 10 Jun 2008 13:17:22 +0000 (13:17 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 10 Jun 2008 13:17:22 +0000 (13:17 +0000)
Fix style warnings from gcc 4.3
Disable -Wconversion since it causes too much trouble with gcc 4.3

source/builder.cpp
source/buildinfo.cpp
source/config.cpp
source/externalaction.cpp
source/misc.cpp
source/objectfile.cpp
source/sourcepackage.cpp
source/tar.cpp

index d3aabf9de4e07fadc86ef472896f9b815bc0eac8..e4f7e580f9a1b15fdf2a52eba51d777884f54099 100644 (file)
@@ -780,7 +780,7 @@ int Builder::do_clean()
        for(set<Target *>::iterator i=clean_tgts.begin(); i!=clean_tgts.end(); ++i)
        {
                Action *action=new Unlink(*this, **i);
-               while(action->check()<0);
+               while(action->check()<0) ;
                delete action;
        }
 
index 4a10872a7539cd3873e7b4afd4b6a5119603b6c6..5164ab08841c1ceed879f6fc5e4939770cd85cca 100644 (file)
@@ -5,6 +5,7 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <algorithm>
 #include "buildinfo.h"
 
 using namespace Msp;
index 753a4ef65b0577dca6bf0301290898461cd188de..4cc9149efe6deb4f672e29e0cfc5ed9e01f4a525 100644 (file)
@@ -5,6 +5,7 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <cstdlib>
 #include <msp/core/except.h>
 #include <msp/io/except.h>
 #include <msp/io/file.h>
@@ -150,7 +151,7 @@ void Config::finish()
                                }
                                else
                                {
-                                       for(end=dollar+1; (isalnum(opt.value[end]) && opt.value[end]!='_'); ++end);
+                                       for(end=dollar+1; (isalnum(opt.value[end]) && opt.value[end]!='_'); ++end) ;
                                        var=opt.value.substr(dollar+1, end-dollar-1);
                                }
 
index 54c9acc1274fed39f2b01c79aafeabdaa8d6d4bd..14657a04ab2c05cfa71d059be4b6c1bbad75a7ca 100644 (file)
@@ -7,6 +7,8 @@ Distributed under the LGPL
 
 #include <sys/wait.h>
 #include <iostream>
+#include <cstring>
+#include <cstdlib>
 #include <msp/path/utils.h>
 #include "builder.h"
 #include "externalaction.h"
index 30239a48eaed27a4bef5cf8ad8ca4ee80e154e3f..a299f0e54b6f1f36c05d338d8c5397eef36495e8 100644 (file)
@@ -7,6 +7,8 @@ Distributed under the LGPL
 
 #include <iostream>
 #include <sys/wait.h>
+#include <cstdlib>
+#include <cstring>
 #include "misc.h"
 
 using namespace std;
index 6790082861875c087fee7f34d953e3e4445f8bf5..c5a87fde883117e61d2cafdce85bae1a4656213e 100644 (file)
@@ -5,6 +5,7 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#include <algorithm>
 #include <msp/path/utils.h>
 #include "builder.h"
 #include "compile.h"
index ef0e60cbb7b2a3373dea85d6da7e50a5426ac6bd..8cff0dfe535b001fc8fa4f57289d87c0637798a6 100644 (file)
@@ -176,7 +176,7 @@ void SourcePackage::create_build_info()
        build_info.cflags.push_back("-Wshadow");
        build_info.cflags.push_back("-Wextra");
        build_info.cflags.push_back("-Wpointer-arith");
-       build_info.cflags.push_back("-Wconversion");
+       //build_info.cflags.push_back("-Wconversion");
        build_info.cflags.push_back("-Werror");
 
        unsigned flags=get_install_flags();
index 0b61b39b85cd4567b8eaf139ee29fb89958d2a53..d43a5b0cbb24e0e49dc384591f9300201e6a58ff 100644 (file)
@@ -6,6 +6,7 @@ Distributed under the LGPL
 */
 
 #include <iostream>
+#include <cstring>
 #include <msp/io/file.h>
 #include <msp/path/utils.h>
 #include "builder.h"