disabled warning 4214
[reactos.git] / reactos / tools / rbuild / backend / msvc / vcprojmaker.cpp
index b62f796..7d963e2 100644 (file)
@@ -90,9 +90,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
        //$progress_current++;\r
        //$output->progress("$dsp_file (file $progress_current of $progress_max)");\r
 \r
-       // TODO FIXME - what's diff. betw. 'c_srcs' and 'source_files'?\r
        string vcproj_path = module.GetBasePath();\r
-       vector<string> c_srcs, source_files, resource_files, includes, libraries, defines;\r
+       vector<string> source_files, resource_files, includes, libraries, defines;\r
        vector<const IfableData*> ifs_list;\r
        ifs_list.push_back ( &module.project.non_if_data );\r
        ifs_list.push_back ( &module.non_if_data );\r
@@ -117,11 +116,10 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                        // TODO FIXME - do we want the full path of the file here?\r
                        string file = string(".") + &files[i]->name[vcproj_path.size()];\r
 \r
-                       source_files.push_back ( file );\r
-                       if ( !stricmp ( Right(file,2).c_str(), ".c" ) )\r
-                               c_srcs.push_back ( file );\r
                        if ( !stricmp ( Right(file,3).c_str(), ".rc" ) )\r
                                resource_files.push_back ( file );\r
+            else\r
+                               source_files.push_back ( file );\r
                }\r
                const vector<Include*>& incs = data.includes;\r
                for ( i = 0; i < incs.size(); i++ )\r
@@ -245,8 +243,8 @@ MSVCBackend::_generate_vcproj ( const Module& module )
        {\r
                std::string& cfg = cfgs[icfg];\r
 \r
-               bool debug = strstr ( cfg.c_str(), "Debug" );\r
-               bool speed = strstr ( cfg.c_str(), "Speed" );\r
+               bool debug = strstr ( cfg.c_str(), "Debug" ) != NULL;\r
+               bool speed = strstr ( cfg.c_str(), "Speed" ) != NULL;\r
                bool release = (!debug && !speed );\r
 \r
                //bool msvc_headers = ( 0 != strstr ( cfg.c_str(), "MSVC Headers" ) );\r
@@ -337,7 +335,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
                }\r
 \r
                fprintf ( OUT, "\t\t\t\tEnablePREfast=\"%s\"\r\n", debug ? "TRUE" : "FALSE");\r
-               fprintf ( OUT, "\t\t\t\tDisableSpecificWarnings=\"4201;4127\"\r\n" );\r
+               fprintf ( OUT, "\t\t\t\tDisableSpecificWarnings=\"4201;4127;4214\"\r\n" );\r
                fprintf ( OUT, "\t\t\t\tWarningLevel=\"%s\"\r\n", release ? "0" : "4" );\r
                fprintf ( OUT, "\t\t\t\tDetect64BitPortabilityProblems=\"%s\"\r\n", release ? "FALSE" : "TRUE");\r
                if ( !module.cplusplus )\r
@@ -529,7 +527,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
        fprintf ( OUT, "\t\t<Filter\r\n" );\r
        fprintf ( OUT, "\t\t\tName=\"Resource Files\"\r\n" );\r
        fprintf ( OUT, "\t\t\tFilter=\"ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\">\r\n" );\r
-       for ( i = 0; i < header_files.size(); i++ )\r
+       for ( i = 0; i < resource_files.size(); i++ )\r
        {\r
                const string& resource_file = resource_files[i];\r
                fprintf ( OUT, "\t\t\t<File\r\n" );\r