summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2026-02-28 14:35:07 -0700
committerGitHub <noreply@github.com>2026-02-28 13:35:07 -0800
commitb5d3b8c059c10711370437f7db7539cd90f1cb29 (patch)
tree8e1ef45570cb137160ceb1f16fb3451d2a359544 /src
parent06ebc176c25f71ce2268755d6c0890a36e78d041 (diff)
Another round of GCC fixes (#3115)
* Fix remaining <string> -> <cstring> for GCC compilation (#3114 follow-up) MWerks' <string> header transitively includes C string functions (memcpy, strlen, strcmp, etc.), but GCC/Clang's <string> is the C++ std::string header. These files all use C string functions and should include <cstring> instead. * Use std::isnan instead of isnan for GCC compilation GCC's <cmath> places isnan in the std namespace. Using the unqualified isnan fails to compile with GCC/Clang. * Fix cCcD_Src types: s32 -> u32 for bitmask fields cCcD_SrcObjCommonBase::mSPrm, cCcD_SrcObjTg::mType, and cCcD_SrcObjAt::mType are used as bitmasks (SetType/SetSPrm take u32, MskType/MskSPrm use u32, values like 0xFFFFFFFF are common in aggregate inits). Change from s32 to u32 to match usage. Also fix AT_TYPE_WOLF_ATTACK/AT_TYPE_UNK to use unsigned literals, and remove now-unnecessary (s32) casts on hex literals in collision source data. * Mark dummy() functions as static to avoid multiple definition errors These decomp artifact functions have the same name and signature across TUs, causing linker errors when building as a single binary.
Diffstat (limited to 'src')
-rw-r--r--src/JSystem/J2DGraph/J2DManage.cpp2
-rw-r--r--src/JSystem/J2DGraph/J2DMaterialFactory.cpp2
-rw-r--r--src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp2
-rw-r--r--src/JSystem/J3DGraphBase/J3DMatBlock.cpp2
-rw-r--r--src/JSystem/J3DGraphBase/J3DPacket.cpp2
-rw-r--r--src/JSystem/J3DGraphBase/J3DShapeDraw.cpp2
-rw-r--r--src/JSystem/J3DGraphBase/J3DVertex.cpp2
-rw-r--r--src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp2
-rw-r--r--src/JSystem/JAudio2/JASWaveArcLoader.cpp2
-rw-r--r--src/JSystem/JHostIO/JHIMccBuf.cpp2
-rw-r--r--src/JSystem/JHostIO/JORServer.cpp2
-rw-r--r--src/JSystem/JKernel/JKRAram.cpp2
-rw-r--r--src/JSystem/JKernel/JKRAramArchive.cpp2
-rw-r--r--src/JSystem/JKernel/JKRArchivePri.cpp2
-rw-r--r--src/JSystem/JKernel/JKRCompArchive.cpp2
-rw-r--r--src/JSystem/JKernel/JKRDvdAramRipper.cpp2
-rw-r--r--src/JSystem/JKernel/JKRDvdArchive.cpp2
-rw-r--r--src/JSystem/JKernel/JKRDvdRipper.cpp2
-rw-r--r--src/JSystem/JKernel/JKRFileCache.cpp2
-rw-r--r--src/JSystem/JKernel/JKRFileLoader.cpp2
-rw-r--r--src/JSystem/JKernel/JKRHeap.cpp2
-rw-r--r--src/JSystem/JKernel/JKRMemArchive.cpp2
-rw-r--r--src/JSystem/JMessage/resource.cpp2
-rw-r--r--src/JSystem/JParticle/JPAResourceManager.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/ctb.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/fvb.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/jstudio-control.cpp2
-rw-r--r--src/JSystem/JStudio/JStudio/stb.cpp2
-rw-r--r--src/JSystem/JSupport/JSUMemoryStream.cpp2
-rw-r--r--src/JSystem/JSupport/JSUOutputStream.cpp2
-rw-r--r--src/JSystem/JUtility/JUTNameTab.cpp2
-rw-r--r--src/JSystem/JUtility/JUTResource.cpp2
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring16
-rw-r--r--src/SSystem/SComponent/c_lib.cpp2
-rw-r--r--src/d/actor/d_a_alink.cpp6
-rw-r--r--src/d/actor/d_a_e_bg.cpp2
-rw-r--r--src/d/actor/d_a_e_dk.cpp2
-rw-r--r--src/d/actor/d_a_e_hm.cpp2
-rw-r--r--src/d/actor/d_a_e_hp.cpp4
-rw-r--r--src/d/actor/d_a_e_hz.cpp2
-rw-r--r--src/d/actor/d_a_e_kr.cpp4
-rw-r--r--src/d/actor/d_a_e_sh.cpp2
-rw-r--r--src/d/actor/d_a_e_yd.cpp4
-rw-r--r--src/d/actor/d_a_e_yr.cpp4
-rw-r--r--src/d/actor/d_a_grass.cpp2
-rw-r--r--src/d/actor/d_a_obj_hakai_brl.cpp2
-rw-r--r--src/d/actor/d_a_obj_kbacket.cpp2
-rw-r--r--src/d/actor/d_a_obj_klift00.cpp2
-rw-r--r--src/d/actor/d_a_obj_wood_statue.cpp2
-rw-r--r--src/d/actor/d_a_tag_kmsg.cpp2
-rw-r--r--src/d/d_envse.cpp2
-rw-r--r--src/d/d_error_msg.cpp2
-rw-r--r--src/d/d_event_manager.cpp2
-rw-r--r--src/d/d_kankyo_wether.cpp2
-rw-r--r--src/d/d_menu_option.cpp2
-rw-r--r--src/d/d_menu_ring.cpp2
-rw-r--r--src/d/d_meter2_draw.cpp2
-rw-r--r--src/d/d_msg_scrn_3select.cpp2
-rw-r--r--src/d/d_msg_scrn_base.cpp2
-rw-r--r--src/f_op/f_op_actor_mng.cpp2
-rw-r--r--src/m_Do/m_Do_main.cpp2
61 files changed, 82 insertions, 66 deletions
diff --git a/src/JSystem/J2DGraph/J2DManage.cpp b/src/JSystem/J2DGraph/J2DManage.cpp
index 19a04db031..a7ac40503f 100644
--- a/src/JSystem/J2DGraph/J2DManage.cpp
+++ b/src/JSystem/J2DGraph/J2DManage.cpp
@@ -2,7 +2,7 @@
#include "JSystem/J2DGraph/J2DManage.h"
#include "JSystem/JSupport/JSUInputStream.h"
-#include <string>
+#include <cstring>
void* J2DDataManage::get(char const* name) {
J2DataManageLink* link;
diff --git a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp
index 8c45bff19e..52349f8304 100644
--- a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp
+++ b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp
@@ -5,7 +5,7 @@
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/JSupport/JSupport.h"
#include "JSystem/JUtility/JUTResource.h"
-#include <string>
+#include <cstring>
#include <dolphin/types.h>
J2DMaterialFactory::J2DMaterialFactory(J2DMaterialBlock const& param_0) {
diff --git a/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp b/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp
index d705c1c59a..f27b56cd1a 100644
--- a/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp
+++ b/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
#include "JSystem/J3DGraphAnimator/J3DModel.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <string>
+#include <cstring>
J3DSkinNList::J3DSkinNList() {
field_0x0 = NULL;
diff --git a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
index 21a8bf5789..004189a89b 100644
--- a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
+++ b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp
@@ -5,7 +5,7 @@
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "JSystem/J3DGraphBase/J3DTransform.h"
#include "global.h"
-#include <string>
+#include <cstring>
inline void loadMatColors(const J3DGXColor* color) {
J3DGDWriteXFCmdHdr(0x100C, 2);
diff --git a/src/JSystem/J3DGraphBase/J3DPacket.cpp b/src/JSystem/J3DGraphBase/J3DPacket.cpp
index 173061882c..5eb6e77392 100644
--- a/src/JSystem/J3DGraphBase/J3DPacket.cpp
+++ b/src/JSystem/J3DGraphBase/J3DPacket.cpp
@@ -7,7 +7,7 @@
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
#include "JSystem/JKernel/JKRHeap.h"
#include <dolphin/os.h>
-#include <string>
+#include <cstring>
#include "global.h"
J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
index e001a8a8b9..94d4534a82 100644
--- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
+++ b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp
@@ -2,7 +2,7 @@
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <string>
+#include <cstring>
#include <stdint.h>
#include <dolphin/gx.h>
diff --git a/src/JSystem/J3DGraphBase/J3DVertex.cpp b/src/JSystem/J3DGraphBase/J3DVertex.cpp
index d455f27c8c..478ff42b0e 100644
--- a/src/JSystem/J3DGraphBase/J3DVertex.cpp
+++ b/src/JSystem/J3DGraphBase/J3DVertex.cpp
@@ -4,7 +4,7 @@
#include "JSystem/J3DGraphAnimator/J3DJointTree.h"
#include "JSystem/J3DGraphBase/J3DSys.h"
#include "JSystem/JKernel/JKRHeap.h"
-#include <string>
+#include <cstring>
J3DVertexData::J3DVertexData() {
mVtxNum = 0;
diff --git a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
index 7d868d8730..a4097a8884 100644
--- a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
+++ b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
@@ -9,7 +9,7 @@
#include "JSystem/JSupport/JSupport.h"
#include "JSystem/JKernel/JKRHeap.h"
#include <dolphin/os.h>
-#include <string>
+#include <cstring>
void* J3DClusterLoaderDataBase::load(const void* i_data) {
J3D_ASSERT_NULLPTR(41, i_data);
diff --git a/src/JSystem/JAudio2/JASWaveArcLoader.cpp b/src/JSystem/JAudio2/JASWaveArcLoader.cpp
index c2b7400444..277933fdb6 100644
--- a/src/JSystem/JAudio2/JASWaveArcLoader.cpp
+++ b/src/JSystem/JAudio2/JASWaveArcLoader.cpp
@@ -5,7 +5,7 @@
#include "JSystem/JAudio2/JASTaskThread.h"
#include "JSystem/JAudio2/JASMutex.h"
#include "JSystem/JKernel/JKRDvdAramRipper.h"
-#include <string>
+#include <cstring>
#include <dolphin/os.h>
#include <stdint.h>
diff --git a/src/JSystem/JHostIO/JHIMccBuf.cpp b/src/JSystem/JHostIO/JHIMccBuf.cpp
index f71f9fc0fa..f013947e26 100644
--- a/src/JSystem/JHostIO/JHIMccBuf.cpp
+++ b/src/JSystem/JHostIO/JHIMccBuf.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JHostIO/JHIRMcc.h"
#include <revolution/hio2.h>
-#include <string>
+#include <cstring>
void JHIReport(const char* fmt, ...) {}
diff --git a/src/JSystem/JHostIO/JORServer.cpp b/src/JSystem/JHostIO/JORServer.cpp
index 5a55a342c9..18086d36d8 100644
--- a/src/JSystem/JHostIO/JORServer.cpp
+++ b/src/JSystem/JHostIO/JORServer.cpp
@@ -5,7 +5,7 @@
#include "JSystem/JHostIO/JORFile.h"
#include "JSystem/JHostIO/JORHostInfo.h"
#include "JSystem/JSupport/JSUMemoryStream.h"
-#include <string>
+#include <cstring>
void JOREventCallbackListNode::JORAppend() {
JORServer* pServer = JORServer::getInstance();
diff --git a/src/JSystem/JKernel/JKRAram.cpp b/src/JSystem/JKernel/JKRAram.cpp
index ffea3d9af7..d6bcec7f6b 100644
--- a/src/JSystem/JKernel/JKRAram.cpp
+++ b/src/JSystem/JKernel/JKRAram.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JUtility/JUTException.h"
#include <dolphin/ar.h>
#include <dolphin/os.h>
-#include <string>
+#include <cstring>
#if PLATFORM_GCN
const u32 stack_size = 0xc00;
diff --git a/src/JSystem/JKernel/JKRAramArchive.cpp b/src/JSystem/JKernel/JKRAramArchive.cpp
index 811978caa0..235fb07515 100644
--- a/src/JSystem/JKernel/JKRAramArchive.cpp
+++ b/src/JSystem/JKernel/JKRAramArchive.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include <cmath>
-#include <string>
+#include <cstring>
JKRAramArchive::JKRAramArchive() {}
diff --git a/src/JSystem/JKernel/JKRArchivePri.cpp b/src/JSystem/JKernel/JKRArchivePri.cpp
index 375e297c37..6a84bbb605 100644
--- a/src/JSystem/JKernel/JKRArchivePri.cpp
+++ b/src/JSystem/JKernel/JKRArchivePri.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JKernel/JKRHeap.h"
#include <cctype>
-#include <string>
+#include <cstring>
u32 JKRArchive::sCurrentDirID;
diff --git a/src/JSystem/JKernel/JKRCompArchive.cpp b/src/JSystem/JKernel/JKRCompArchive.cpp
index 8a1577f592..ace09dad8b 100644
--- a/src/JSystem/JKernel/JKRCompArchive.cpp
+++ b/src/JSystem/JKernel/JKRCompArchive.cpp
@@ -11,7 +11,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include <cmath>
-#include <string>
+#include <cstring>
#include <stdint.h>
JKRCompArchive::JKRCompArchive(s32 entryNum, JKRArchive::EMountDirection eMountDirection)
diff --git a/src/JSystem/JKernel/JKRDvdAramRipper.cpp b/src/JSystem/JKernel/JKRDvdAramRipper.cpp
index 3ca276e050..930b4df354 100644
--- a/src/JSystem/JKernel/JKRDvdAramRipper.cpp
+++ b/src/JSystem/JKernel/JKRDvdAramRipper.cpp
@@ -11,7 +11,7 @@
#include <dolphin/os.h>
#include <dolphin/vi.h>
#include "global.h"
-#include <string>
+#include <cstring>
static int JKRDecompressFromDVDToAram(JKRDvdFile*, u32, u32, u32, u32, u32, u32*);
static int decompSZS_subroutine(u8*, u32);
diff --git a/src/JSystem/JKernel/JKRDvdArchive.cpp b/src/JSystem/JKernel/JKRDvdArchive.cpp
index ed88d791e7..c2cdf00f5e 100644
--- a/src/JSystem/JKernel/JKRDvdArchive.cpp
+++ b/src/JSystem/JKernel/JKRDvdArchive.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include <cmath>
-#include <string>
+#include <cstring>
#include "global.h"
#include <stdint.h>
diff --git a/src/JSystem/JKernel/JKRDvdRipper.cpp b/src/JSystem/JKernel/JKRDvdRipper.cpp
index cf84ef9eec..fb5806c0a9 100644
--- a/src/JSystem/JKernel/JKRDvdRipper.cpp
+++ b/src/JSystem/JKernel/JKRDvdRipper.cpp
@@ -8,7 +8,7 @@
#include "JSystem/JKernel/JKRDvdFile.h"
#include "JSystem/JKernel/JKRDecomp.h"
#include "JSystem/JUtility/JUTException.h"
-#include <string>
+#include <cstring>
#include <dolphin/os.h>
#include <dolphin/vi.h>
#include <stdint.h>
diff --git a/src/JSystem/JKernel/JKRFileCache.cpp b/src/JSystem/JKernel/JKRFileCache.cpp
index 1dc3a719ef..d0162d95e5 100644
--- a/src/JSystem/JKernel/JKRFileCache.cpp
+++ b/src/JSystem/JKernel/JKRFileCache.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include <cctype>
-#include <string>
+#include <cstring>
#include "global.h"
JKRFileCache* JKRFileCache::mount(const char* path, JKRHeap* heap, const char* param_3) {
diff --git a/src/JSystem/JKernel/JKRFileLoader.cpp b/src/JSystem/JKernel/JKRFileLoader.cpp
index 26790f87b6..6bb460e93a 100644
--- a/src/JSystem/JKernel/JKRFileLoader.cpp
+++ b/src/JSystem/JKernel/JKRFileLoader.cpp
@@ -4,7 +4,7 @@
#define MSL_USE_INLINES 1 // needed to inline tolower call. not inlined elsewhere in the repo
-#include <string>
+#include <cstring>
#include <cctype>
#include "global.h"
diff --git a/src/JSystem/JKernel/JKRHeap.cpp b/src/JSystem/JKernel/JKRHeap.cpp
index 720166455a..8655a80ae3 100644
--- a/src/JSystem/JKernel/JKRHeap.cpp
+++ b/src/JSystem/JKernel/JKRHeap.cpp
@@ -9,7 +9,7 @@
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
#include <stdint.h>
-#include <string>
+#include <cstring>
#if DEBUG
u8 JKRValue_DEBUGFILL_NOTUSE = 0xFD;
diff --git a/src/JSystem/JKernel/JKRMemArchive.cpp b/src/JSystem/JKernel/JKRMemArchive.cpp
index 0c0ef4887c..86d6ef63cf 100644
--- a/src/JSystem/JKernel/JKRMemArchive.cpp
+++ b/src/JSystem/JKernel/JKRMemArchive.cpp
@@ -5,7 +5,7 @@
#include "JSystem/JKernel/JKRDvdRipper.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "JSystem/JUtility/JUTException.h"
-#include <string>
+#include <cstring>
#include "global.h"
#include <stdint.h>
diff --git a/src/JSystem/JMessage/resource.cpp b/src/JSystem/JMessage/resource.cpp
index 04387050c2..5bda061497 100644
--- a/src/JSystem/JMessage/resource.cpp
+++ b/src/JSystem/JMessage/resource.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JGadget/search.h"
#include "JSystem/JGadget/define.h"
#include <algorithm>
-#include <string>
+#include <cstring>
u16 JMessage::TResource::toMessageIndex_messageID(u32 uMsgID, u32 upperHalf, bool* pbValid) const {
if (!oParse_TBlock_messageID_.getRaw()) {
diff --git a/src/JSystem/JParticle/JPAResourceManager.cpp b/src/JSystem/JParticle/JPAResourceManager.cpp
index e382a39110..9ea2dff128 100644
--- a/src/JSystem/JParticle/JPAResourceManager.cpp
+++ b/src/JSystem/JParticle/JPAResourceManager.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JParticle/JPAResourceManager.h"
#include "JSystem/JParticle/JPADynamicsBlock.h"
#include "JSystem/JParticle/JPAResource.h"
-#include <string>
+#include <cstring>
struct JPAResourceLoader {
JPAResourceLoader(u8 const*, JPAResourceManager*);
diff --git a/src/JSystem/JStudio/JStudio/ctb.cpp b/src/JSystem/JStudio/JStudio/ctb.cpp
index a28752af7a..5a2c0c11cb 100644
--- a/src/JSystem/JStudio/JStudio/ctb.cpp
+++ b/src/JSystem/JStudio/JStudio/ctb.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JStudio/JStudio/ctb.h"
#include <iterator>
-#include <string>
+#include <cstring>
#include <algorithm>
JStudio::ctb::TObject::~TObject() {}
diff --git a/src/JSystem/JStudio/JStudio/fvb.cpp b/src/JSystem/JStudio/JStudio/fvb.cpp
index 94721909c4..1f8b68b4a2 100644
--- a/src/JSystem/JStudio/JStudio/fvb.cpp
+++ b/src/JSystem/JStudio/JStudio/fvb.cpp
@@ -2,7 +2,7 @@
#include "JSystem/JStudio/JStudio/fvb.h"
#include "JSystem/JUtility/JUTException.h"
-#include <string>
+#include <cstring>
namespace JStudio {
namespace fvb {
diff --git a/src/JSystem/JStudio/JStudio/jstudio-control.cpp b/src/JSystem/JStudio/JStudio/jstudio-control.cpp
index 38fe394ea0..dd11fe431b 100644
--- a/src/JSystem/JStudio/JStudio/jstudio-control.cpp
+++ b/src/JSystem/JStudio/JStudio/jstudio-control.cpp
@@ -7,7 +7,7 @@
#include "JSystem/JStudio/JStudio/jstudio-control.h"
#include "JSystem/JStudio/JStudio/jstudio-math.h"
#include "JSystem/JStudio/JStudio/jstudio-data.h"
-#include <string>
+#include <cstring>
JStudio::TControl::TControl() {
mTransformOnSet = false;
diff --git a/src/JSystem/JStudio/JStudio/stb.cpp b/src/JSystem/JStudio/JStudio/stb.cpp
index b2dbddbd6d..424bc4e3fb 100644
--- a/src/JSystem/JStudio/JStudio/stb.cpp
+++ b/src/JSystem/JStudio/JStudio/stb.cpp
@@ -4,7 +4,7 @@
#include "JSystem/JStudio/JStudio/jstudio-object.h"
#include "JSystem/JUtility/JUTException.h"
#include <algorithm>
-#include <string>
+#include <cstring>
namespace JStudio {
namespace stb {
diff --git a/src/JSystem/JSupport/JSUMemoryStream.cpp b/src/JSystem/JSupport/JSUMemoryStream.cpp
index 9364bc7d0d..6fb5cd03fc 100644
--- a/src/JSystem/JSupport/JSUMemoryStream.cpp
+++ b/src/JSystem/JSupport/JSUMemoryStream.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JSupport/JSUMemoryStream.h"
-#include <string>
+#include <cstring>
void JSUMemoryInputStream::setBuffer(void const* pBuffer, s32 length) {
mBuffer = pBuffer;
diff --git a/src/JSystem/JSupport/JSUOutputStream.cpp b/src/JSystem/JSupport/JSUOutputStream.cpp
index 132b143c5d..dec0976ad3 100644
--- a/src/JSystem/JSupport/JSUOutputStream.cpp
+++ b/src/JSystem/JSupport/JSUOutputStream.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JSupport/JSUOutputStream.h"
#include "JSystem/JSupport/JSURandomOutputStream.h"
#include <dolphin/dolphin.h>
-#include <string>
+#include <cstring>
JSUOutputStream::~JSUOutputStream() {
if (!isGood()) {
diff --git a/src/JSystem/JUtility/JUTNameTab.cpp b/src/JSystem/JUtility/JUTNameTab.cpp
index 3b6ed448e0..8b1cdbdf71 100644
--- a/src/JSystem/JUtility/JUTNameTab.cpp
+++ b/src/JSystem/JUtility/JUTNameTab.cpp
@@ -1,7 +1,7 @@
#include "JSystem/JSystem.h" // IWYU pragma: keep
#include "JSystem/JUtility/JUTNameTab.h"
-#include <string>
+#include <cstring>
JUTNameTab::JUTNameTab() {
setResource(NULL);
diff --git a/src/JSystem/JUtility/JUTResource.cpp b/src/JSystem/JUtility/JUTResource.cpp
index 3c80c471d6..cc0258face 100644
--- a/src/JSystem/JUtility/JUTResource.cpp
+++ b/src/JSystem/JUtility/JUTResource.cpp
@@ -3,7 +3,7 @@
#include "JSystem/JUtility/JUTResource.h"
#include "JSystem/JKernel/JKRArchive.h"
#include "JSystem/JSupport/JSUInputStream.h"
-#include <string>
+#include <cstring>
void* JUTResReference::getResource(JSUInputStream* stream, u32 resType, JKRArchive* archive) {
stream->read(mType);
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring
index c55307fb71..b7c2e53a2a 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cstring
@@ -26,6 +26,22 @@ size_t strlen(const char* str);
#ifdef __cplusplus
};
+
+namespace std {
+using ::memcpy;
+using ::memset;
+using ::memcmp;
+using ::memchr;
+using ::memmove;
+using ::strrchr;
+using ::strchr;
+using ::strlen;
+using ::strncmp;
+using ::strcmp;
+using ::strcat;
+using ::strncpy;
+using ::strcpy;
+} // namespace std
#endif
#endif /* _MSL_COMMON_STRING_H */
diff --git a/src/SSystem/SComponent/c_lib.cpp b/src/SSystem/SComponent/c_lib.cpp
index 4440acbc07..6441d6ceb8 100644
--- a/src/SSystem/SComponent/c_lib.cpp
+++ b/src/SSystem/SComponent/c_lib.cpp
@@ -4,7 +4,7 @@
*/
#include "SSystem/SComponent/c_lib.h"
-#include <string>
+#include <cstring>
#include "SSystem/SComponent/c_math.h"
/**
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp
index 8977c2c076..a2b5a11f6d 100644
--- a/src/d/actor/d_a_alink.cpp
+++ b/src/d/actor/d_a_alink.cpp
@@ -1467,7 +1467,7 @@ static f32 l_ladderAnmBaseTransY = 102.00054168701172f;
static dCcD_SrcCyl l_cylSrc = {
{
- {0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {(s32)0xD8FFFDFF, 5}, 0x73}},
+ {0, {{AT_TYPE_WOLF_ATTACK, 3, 0x1A}, {0xD8FFFDFF, 5}, 0x73}},
{dCcD_SE_WOLF_BITE, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -1483,7 +1483,7 @@ static dCcD_SrcCyl l_cylSrc = {
static dCcD_SrcSph l_sphSrc = {
{
- {0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {(s32)0xD8FBFDFF, 5}, 0x73}},
+ {0, {{AT_TYPE_NORMAL_SWORD, 3, 0x1A}, {0xD8FBFDFF, 5}, 0x73}},
{dCcD_SE_SWORD, 3, 1, 0, {1}},
{dCcD_SE_NONE, 6, 0, 0, {0}},
{0},
@@ -4640,7 +4640,7 @@ void daAlink_c::playerInit() {
}
}
-void dummy(fopAc_ac_c* i_this) {
+static void dummy(fopAc_ac_c* i_this) {
fopAcM_RegisterCreateID(i_this, "ALINK");
}
diff --git a/src/d/actor/d_a_e_bg.cpp b/src/d/actor/d_a_e_bg.cpp
index 1f1514bed6..be19dfcae2 100644
--- a/src/d/actor/d_a_e_bg.cpp
+++ b/src/d/actor/d_a_e_bg.cpp
@@ -44,7 +44,7 @@ void daE_BG_HIO_c::genMessage(JORMContext* ctx) {
namespace {
dCcD_SrcSph cc_bg_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x03}, 0x75}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x03}, 0x75}}, // mObj
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_dk.cpp b/src/d/actor/d_a_e_dk.cpp
index a21506dcba..6efac3410b 100644
--- a/src/d/actor/d_a_e_dk.cpp
+++ b/src/d/actor/d_a_e_dk.cpp
@@ -46,7 +46,7 @@ enum E_DK_RES_FILE_ID {
namespace {
static dCcD_SrcSph cc_dk_src = {
{ // mObjInf
- { 0x0, { { 0, 0, { 0 } }, { (s32)0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
+ { 0x0, { { 0, 0, { 0 } }, { 0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
{ 0x09, 0, 0, 0, { 0 } }, // mGObjAt
{ 0x00, 0x00, 0x00, 0x00, { 5 } }, // mGObjTg
{ { 0 } }, // mGObjCo
diff --git a/src/d/actor/d_a_e_hm.cpp b/src/d/actor/d_a_e_hm.cpp
index 7dcd7c5317..11eacb6b34 100644
--- a/src/d/actor/d_a_e_hm.cpp
+++ b/src/d/actor/d_a_e_hm.cpp
@@ -94,7 +94,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
void daE_HM_c::initCcCylinder() {
static const dCcD_SrcSph ccShpSrc = {
{
- {0x0, {{0x2, 0x1, 0xd}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
+ {0x0, {{0x2, 0x1, 0xd}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp
index 49d563fec3..a1f202489a 100644
--- a/src/d/actor/d_a_e_hp.cpp
+++ b/src/d/actor/d_a_e_hp.cpp
@@ -31,7 +31,7 @@ public:
namespace {
static dCcD_SrcCyl cc_hp_src = {
{
- {0, {{0x0, 0x0, 0x0}, {(s32)0xd8000000, 0x3}, 0x0}},
+ {0, {{0x0, 0x0, 0x0}, {0xd8000000, 0x3}, 0x0}},
{dCcD_SE_13, 0, 0, 0, {0}},
{dCcD_SE_NONE, 0, 0, 0, {6}},
{0},
@@ -47,7 +47,7 @@ static dCcD_SrcCyl cc_hp_src = {
static dCcD_SrcSph cc_lamp_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
{dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x6}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_hz.cpp b/src/d/actor/d_a_e_hz.cpp
index 5d926a4d57..8b68050235 100644
--- a/src/d/actor/d_a_e_hz.cpp
+++ b/src/d/actor/d_a_e_hz.cpp
@@ -2016,7 +2016,7 @@ int daE_HZ_c::create() {
static dCcD_SrcSph cc_sph_src2 = {
{
- {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {(s32)0xd8fafdff, 0x3}, 0x75}}, // mObj
+ {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fafdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_kr.cpp b/src/d/actor/d_a_e_kr.cpp
index 4001092815..c32921568b 100644
--- a/src/d/actor/d_a_e_kr.cpp
+++ b/src/d/actor/d_a_e_kr.cpp
@@ -2258,7 +2258,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
};
static dCcD_SrcSph head_tg_sph_src = {
{
- {0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -2270,7 +2270,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph body_tg_sph_src = {
{
- {0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_sh.cpp b/src/d/actor/d_a_e_sh.cpp
index a2d7722926..b05c57eef8 100644
--- a/src/d/actor/d_a_e_sh.cpp
+++ b/src/d/actor/d_a_e_sh.cpp
@@ -1160,7 +1160,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
static int daE_SH_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph cc_sph_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x75}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_yd.cpp b/src/d/actor/d_a_e_yd.cpp
index bd54664088..3146abf018 100644
--- a/src/d/actor/d_a_e_yd.cpp
+++ b/src/d/actor/d_a_e_yd.cpp
@@ -1361,7 +1361,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
static int daE_YD_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph cc_sph_src = {
{
- {0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fbfdff, 0x3}, 0x25}}, // mObj
+ {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x25}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -1383,7 +1383,7 @@ static int daE_YD_Create(fopAc_ac_c* i_this) {
};
static dCcD_SrcSph kuki_sph_src = {
{
- {0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_e_yr.cpp b/src/d/actor/d_a_e_yr.cpp
index f329c48a9a..61132a0de8 100644
--- a/src/d/actor/d_a_e_yr.cpp
+++ b/src/d/actor/d_a_e_yr.cpp
@@ -2416,7 +2416,7 @@ static int daE_Yr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph head_tg_sph_src = {
{
- {0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
@@ -2428,7 +2428,7 @@ static int daE_Yr_Create(fopAc_ac_c* i_this) {
static dCcD_SrcSph body_tg_sph_src = {
{
- {0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
+ {0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_grass.cpp b/src/d/actor/d_a_grass.cpp
index 33a079524c..04992b39b5 100644
--- a/src/d/actor/d_a_grass.cpp
+++ b/src/d/actor/d_a_grass.cpp
@@ -10,7 +10,7 @@
#include "SSystem/SComponent/c_math.h"
#include "d/d_com_inf_game.h"
#include "Z2AudioLib/Z2Instances.h"
-#include <string>
+#include <cstring>
#include "d/actor/d_grass.inc" // IWYU pragma: keep
#include "d/actor/d_flower.inc"
diff --git a/src/d/actor/d_a_obj_hakai_brl.cpp b/src/d/actor/d_a_obj_hakai_brl.cpp
index 756ee528ab..1b71ca265c 100644
--- a/src/d/actor/d_a_obj_hakai_brl.cpp
+++ b/src/d/actor/d_a_obj_hakai_brl.cpp
@@ -84,7 +84,7 @@ int daObjHBarrel_c::execute() {
dCcD_SrcCyl const daObjHBarrel_c::s_CcDCyl = {
{
- {0x0, {{0x0, 0x0, 0xd}, {(s32)0xd8fafdff, 0x11}, 0x79}}, // mObj
+ {0x0, {{0x0, 0x0, 0xd}, {0xd8fafdff, 0x11}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x5}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_obj_kbacket.cpp b/src/d/actor/d_a_obj_kbacket.cpp
index d200074e31..5333f8f912 100644
--- a/src/d/actor/d_a_obj_kbacket.cpp
+++ b/src/d/actor/d_a_obj_kbacket.cpp
@@ -22,7 +22,7 @@ const daObj_KBacket_HIOParam daObj_KBacket_Param_c::m = {
};
static const dCcD_SrcGObjInf l_ccDObjData = {
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x0}, 0x79}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x0}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_obj_klift00.cpp b/src/d/actor/d_a_obj_klift00.cpp
index 739c7fe7f8..cc5ee259d7 100644
--- a/src/d/actor/d_a_obj_klift00.cpp
+++ b/src/d/actor/d_a_obj_klift00.cpp
@@ -78,7 +78,7 @@ static const char* l_arcName = "K_lift00";
static dCcD_SrcSph l_cc_sph_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x11}, 0x79}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x11}, 0x79}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x5, 0x0, 0x0, 0x2}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_obj_wood_statue.cpp b/src/d/actor/d_a_obj_wood_statue.cpp
index bcbf449891..23bcad36f7 100644
--- a/src/d/actor/d_a_obj_wood_statue.cpp
+++ b/src/d/actor/d_a_obj_wood_statue.cpp
@@ -14,7 +14,7 @@
const static dCcD_SrcCyl l_cyl_src = {
{
- {0x0, {{0x0, 0x0, 0x0}, {-1, 0x11}, 0x59}}, // mObj
+ {0x0, {{0x0, 0x0, 0x0}, {0xFFFFFFFF, 0x11}, 0x59}}, // mObj
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x4}, // mGObjTg
{0x0}, // mGObjCo
diff --git a/src/d/actor/d_a_tag_kmsg.cpp b/src/d/actor/d_a_tag_kmsg.cpp
index 1588e5a9c2..8c2d036149 100644
--- a/src/d/actor/d_a_tag_kmsg.cpp
+++ b/src/d/actor/d_a_tag_kmsg.cpp
@@ -4,7 +4,7 @@
#include "d/actor/d_a_npc.h"
#include "d/actor/d_a_player.h"
#include "SSystem/SComponent/c_counter.h"
-#include <string>
+#include <cstring>
struct EventListItem {
char* mEventName;
diff --git a/src/d/d_envse.cpp b/src/d/d_envse.cpp
index df9a133bec..734ed221e7 100644
--- a/src/d/d_envse.cpp
+++ b/src/d/d_envse.cpp
@@ -9,7 +9,7 @@
#include "d/d_com_inf_game.h"
#include "d/d_path.h"
#include "f_op/f_op_camera_mng.h"
-#include <string>
+#include <cstring>
static int dEnvSe_Draw(dEnvSe_c* i_this) {
return 1;
diff --git a/src/d/d_error_msg.cpp b/src/d/d_error_msg.cpp
index 2436f983ea..460c794dbd 100644
--- a/src/d/d_error_msg.cpp
+++ b/src/d/d_error_msg.cpp
@@ -5,7 +5,7 @@
#include "d/dolzel.h" // IWYU pragma: keep
-#include <string>
+#include <cstring>
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
#include "JSystem/J2DGraph/J2DPicture.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp
index 41b31b5837..8b2291b124 100644
--- a/src/d/d_event_manager.cpp
+++ b/src/d/d_event_manager.cpp
@@ -13,7 +13,7 @@
#include "d/d_demo.h"
#include "d/d_s_play.h"
#include "SSystem/SComponent/c_counter.h"
-#include <string>
+#include <cstring>
#if DEBUG
static dEvM_HIO_c l_HIO;
diff --git a/src/d/d_kankyo_wether.cpp b/src/d/d_kankyo_wether.cpp
index 8acb561fde..0e0617639d 100644
--- a/src/d/d_kankyo_wether.cpp
+++ b/src/d/d_kankyo_wether.cpp
@@ -12,7 +12,7 @@
#include "d/d_kankyo.h"
#include "d/d_kankyo_rain.h"
#include "f_op/f_op_camera_mng.h"
-#include <string>
+#include <cstring>
#include "m_Do/m_Do_audio.h"
static void dKyw_pntlight_set(WIND_INFLUENCE* pntwind);
diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp
index 269bef1849..898b210b45 100644
--- a/src/d/d_menu_option.cpp
+++ b/src/d/d_menu_option.cpp
@@ -22,7 +22,7 @@
#include "f_op/f_op_msg_mng.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
-#include <string>
+#include <cstring>
typedef void (dMenu_Option_c::*initFunc)();
static initFunc init[] = {
diff --git a/src/d/d_menu_ring.cpp b/src/d/d_menu_ring.cpp
index 49c3e4000b..92e81fa350 100644
--- a/src/d/d_menu_ring.cpp
+++ b/src/d/d_menu_ring.cpp
@@ -25,7 +25,7 @@
#include "d/d_msg_string.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
-#include <string>
+#include <cstring>
#include <cstdio>
diff --git a/src/d/d_meter2_draw.cpp b/src/d/d_meter2_draw.cpp
index 5be39371cd..f8f0ca10e6 100644
--- a/src/d/d_meter2_draw.cpp
+++ b/src/d/d_meter2_draw.cpp
@@ -20,7 +20,7 @@
#include "d/d_msg_class.h"
#include "d/d_msg_object.h"
#include "d/d_pane_class.h"
-#include <string>
+#include <cstring>
dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
OS_REPORT("enter dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap *mp_heap)\n");
diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp
index f8c9167be1..a41895aac4 100644
--- a/src/d/d_msg_scrn_3select.cpp
+++ b/src/d/d_msg_scrn_3select.cpp
@@ -10,7 +10,7 @@
#include "JSystem/J2DGraph/J2DGrafContext.h"
#include "JSystem/J2DGraph/J2DScreen.h"
#include "JSystem/J2DGraph/J2DTextBox.h"
-#include <string>
+#include <cstring>
#include "d/d_com_inf_game.h"
#include "d/d_select_cursor.h"
#include "d/d_msg_object.h"
diff --git a/src/d/d_msg_scrn_base.cpp b/src/d/d_msg_scrn_base.cpp
index 43651004d3..84899c2824 100644
--- a/src/d/d_msg_scrn_base.cpp
+++ b/src/d/d_msg_scrn_base.cpp
@@ -6,7 +6,7 @@
#include "d/d_msg_object.h"
#include "d/d_msg_out_font.h"
#include "d/d_pane_class.h"
-#include <string>
+#include <cstring>
dMsgScrnBase_c::dMsgScrnBase_c() {
init();
diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp
index 28b5b6abfa..2bc28c2014 100644
--- a/src/f_op/f_op_actor_mng.cpp
+++ b/src/f_op/f_op_actor_mng.cpp
@@ -776,7 +776,7 @@ bool fopAcM_addAngleY(fopAc_ac_c* i_actor, s16 i_target, s16 i_step) {
return cLib_chaseAngleS(&angle->y, i_target, i_step);
}
-void dummy(fopAc_ac_c* i_actor) {
+static void dummy(fopAc_ac_c* i_actor) {
fopAcM_SetSpeedF(i_actor, 10.0f);
}
diff --git a/src/m_Do/m_Do_main.cpp b/src/m_Do/m_Do_main.cpp
index 901b8c980b..23753b59ed 100644
--- a/src/m_Do/m_Do_main.cpp
+++ b/src/m_Do/m_Do_main.cpp
@@ -33,7 +33,7 @@
#include "m_Do/m_Do_printf.h"
#include "m_Do/m_Do_ext2.h"
#include "SSystem/SComponent/c_counter.h"
-#include <string>
+#include <cstring>
#if PLATFORM_WII || PLATFORM_SHIELD
#include <revolution/sc.h>