From 046f94d3acc9d4f6465fe05ae8ee3fbd315b23d2 Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Tue, 26 Jul 2016 15:04:16 +0200 Subject: [PATCH] Remove some unused variables --- bin/tests/test_misc.cpp | 2 +- bin/tests/test_physics.cpp | 2 +- bin/tests/test_physics_2d.cpp | 2 +- core/object_type_db.cpp | 7 ------- drivers/unix/os_unix.cpp | 2 +- modules/gdscript/gd_editor.cpp | 2 +- platform/android/export/export.cpp | 12 ++++++------ platform/osx/export/export.cpp | 2 +- servers/visual/rasterizer.cpp | 3 --- 9 files changed, 12 insertions(+), 22 deletions(-) diff --git a/bin/tests/test_misc.cpp b/bin/tests/test_misc.cpp index 68564c62b05..9d7adc35731 100644 --- a/bin/tests/test_misc.cpp +++ b/bin/tests/test_misc.cpp @@ -431,7 +431,7 @@ public: RID lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL ); //vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) ); //vs->light_set_shadow( lightaux, true ); - RID light = vs->instance_create2( lightaux,scenario ); + vs->instance_create2( lightaux,scenario ); //rot_a=Transform(Matrix3(Vector3(1,0,0),Math_PI/2.0),Vector3()); rot_b=Transform(Matrix3(),Vector3(2,0,0)); diff --git a/bin/tests/test_physics.cpp b/bin/tests/test_physics.cpp index ecd90a13d46..f202d0dda1b 100644 --- a/bin/tests/test_physics.cpp +++ b/bin/tests/test_physics.cpp @@ -609,7 +609,7 @@ public: //t.basis.rotate(Vector3(-1,0,0),Math_PI/4*i); - RID b = create_body(type,PhysicsServer::BODY_MODE_RIGID,t); + create_body(type,PhysicsServer::BODY_MODE_RIGID,t); //RID b = create_body(type,i==0?PhysicsServer::BODY_MODE_STATIC:PhysicsServer::BODY_MODE_RIGID,t); } diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp index c5fb7349998..845e20b6c38 100644 --- a/bin/tests/test_physics_2d.cpp +++ b/bin/tests/test_physics_2d.cpp @@ -410,7 +410,7 @@ public: Physics2DServer::ShapeType type = types[i%4]; // type=Physics2DServer::SHAPE_SEGMENT; - RID b = _add_body(type,Matrix32(i*0.8,Point2(152+i*40,100-40*i))); + _add_body(type,Matrix32(i*0.8,Point2(152+i*40,100-40*i))); //if (i==0) // ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC); } diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp index 4998263961c..8c73d3b9af4 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -849,21 +849,14 @@ MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , c Vector defvals; -#define PARSE_DEFVAL(m_defval)\ -if (d##m_defval.used) defvals.insert(0,d##m_defval.val);\ -else goto set_defvals; - defvals.resize(p_defcount); for(int i=0;iset_default_arguments(defvals); p_bind->set_hint_flags(p_flags); -#undef PARSE_DEFVAL return p_bind; } diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index fd515d6dd30..271cf302ef2 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -390,7 +390,7 @@ Error OS_Unix::execute(const String& p_path, const List& p_arguments,boo if (p_blocking) { int status; - pid_t rpid = waitpid(pid,&status,0); + waitpid(pid,&status,0); if (r_exitcode) *r_exitcode=WEXITSTATUS(status); } else { diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 520a8b18d86..0af5897b418 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -2067,7 +2067,7 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base GDParser p; - Error err = p.parse(p_code,p_base_path,false,"",true); + p.parse(p_code,p_base_path,false,"",true); bool isfunction=false; Set options; diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 10d77aba6cc..a8456ac4efa 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -660,7 +660,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector& p_manifest,bool uint32_t filesize = decode_uint32(&p_manifest[ofs+4]); ofs+=8; -// print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size())); + //print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size())); uint32_t string_count; uint32_t styles_count; @@ -687,7 +687,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector& p_manifest,bool string_count=decode_uint32(&p_manifest[iofs]); styles_count=decode_uint32(&p_manifest[iofs+4]); - uint32_t string_flags=decode_uint32(&p_manifest[iofs+8]); + string_flags=decode_uint32(&p_manifest[iofs+8]); string_data_offset=decode_uint32(&p_manifest[iofs+12]); styles_offset=decode_uint32(&p_manifest[iofs+16]); /* @@ -1355,7 +1355,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d args.push_back(unaligned_path); args.push_back(user); int retval; - int err = OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval); + OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval); if (retval) { EditorNode::add_io_error("'jarsigner' returned with error #"+itos(retval)); return ERR_CANT_CREATE; @@ -1368,7 +1368,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d args.push_back(unaligned_path); args.push_back("-verbose"); - err = OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval); + OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval); if (retval) { EditorNode::add_io_error("'jarsigner' verification of APK failed. Make sure to use jarsigner from Java 6."); return ERR_CANT_CREATE; @@ -1515,7 +1515,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) { List args; args.push_back("devices"); int ec; - Error err = OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec); + OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec); Vector ds = devices.split("\n"); Vector ldevices; for(int i=1;iexecute(adb,args,true,NULL,&dp,&ec); + OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec); Vector props = dp.split("\n"); String vendor; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 47b0392b255..30f4c58150a 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -445,7 +445,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug { //write datapack - int err = zipOpenNewFileInZip(dpkg, + zipOpenNewFileInZip(dpkg, (pkg_name+".app/Contents/Resources/data.pck").utf8().get_data(), NULL, NULL, diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp index 32f5b80e55d..a4b91e17fee 100644 --- a/servers/visual/rasterizer.cpp +++ b/servers/visual/rasterizer.cpp @@ -290,9 +290,6 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) { //print_line("**VERTEX SHADER GENERATED code: \n"+vcode); - double tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0; -// print_line("generate: "+rtos(tf)); - shader_set_code(fms.shader,vcode,code,lcode,0,0); fixed_material_shaders[p_key]=fms;