Skip to content

Commit

Permalink
Merge pull request #13852 from unknownbrackets/warnings
Browse files Browse the repository at this point in the history
A few more warning fixes
  • Loading branch information
hrydgard committed Jan 2, 2021
2 parents fa466d2 + 64f3830 commit 1282653
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Common/GPU/ShaderWriter.cpp
Expand Up @@ -205,7 +205,7 @@ void ShaderWriter::BeginFSMain(Slice<UniformDef> uniforms, Slice<VaryingDef> var
break;
case HLSL_D3D9:
for (auto &uniform : uniforms) {
F(" %s %s : %s;\n", uniform.type, uniform.name, uniform.index);
F(" %s %s : register(c%d);\n", uniform.type, uniform.name, uniform.index);
}
// Let's do the varyings as parameters to main, no struct.
C("vec4 main(");
Expand Down
2 changes: 1 addition & 1 deletion Core/Debugger/WebSocket/DisasmSubscriber.cpp
Expand Up @@ -262,7 +262,7 @@ uint32_t WebSocketDisasmState::RoundAddressUp(uint32_t addr) {
// - addressHex: string indicating base address in hexadecimal (may be 64 bit.)
void WebSocketDisasmState::Base(DebuggerRequest &req) {
JsonWriter &json = req.Respond();
json.writeString("addressHex", StringFromFormat("%016llx", Memory::base));
json.writeString("addressHex", StringFromFormat("%016llx", (uintptr_t)Memory::base));
}

// Disassemble a range of memory as CPU instructions (memory.disasm)
Expand Down
1 change: 1 addition & 0 deletions Core/HLE/scePsmf.cpp
Expand Up @@ -217,6 +217,7 @@ class PsmfPlayer {
}
PsmfPlayer(const PsmfPlayerCreateData *data);
~PsmfPlayer() {
AbortFinish();
if (mediaengine)
delete mediaengine;
pspFileSystem.CloseFile(filehandle);
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/PresentationCommon.cpp
Expand Up @@ -204,7 +204,7 @@ static std::string ReadShaderSrc(const std::string &filename) {
return "";

std::string src(data, sz);
free(data);
delete[] data;
return src;
}

Expand Down
2 changes: 1 addition & 1 deletion GPU/Vulkan/TextureCacheVulkan.cpp
Expand Up @@ -383,7 +383,7 @@ static std::string ReadShaderSrc(const std::string &filename) {
return "";

std::string src(data, sz);
free(data);
delete[] data;
return src;
}

Expand Down
4 changes: 2 additions & 2 deletions UI/SavedataScreen.cpp
Expand Up @@ -103,7 +103,7 @@ class SavedataPopupScreen : public PopupScreen {
LinearLayout *topright = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT, 1.0f));
topright->SetSpacing(1.0f);
topright->Add(new TextView(savedata_title, ALIGN_LEFT | FLAG_WRAP_TEXT, false))->SetTextColor(textStyle.fgColor);
topright->Add(new TextView(StringFromFormat("%d kB", ginfo->gameSize / 1024), 0, true))->SetTextColor(textStyle.fgColor);
topright->Add(new TextView(StringFromFormat("%lld kB", ginfo->gameSize / 1024), 0, true))->SetTextColor(textStyle.fgColor);
topright->Add(new TextView(GetFileDateAsString(savePath_ + "/PARAM.SFO"), 0, true))->SetTextColor(textStyle.fgColor);
toprow->Add(topright);
content->Add(new Spacer(3.0));
Expand Down Expand Up @@ -292,7 +292,7 @@ void SavedataButton::Draw(UIContext &dc) {
}
if (subtitle_.empty() && ginfo->gameSize > 0) {
std::string savedata_title = ginfo->paramSFO.GetValueString("SAVEDATA_TITLE");
subtitle_ = CleanSaveString(savedata_title) + StringFromFormat(" (%d kB)", ginfo->gameSize / 1024);
subtitle_ = CleanSaveString(savedata_title) + StringFromFormat(" (%lld kB)", ginfo->gameSize / 1024);
}

dc.MeasureText(dc.GetFontStyle(), 1.0f, 1.0f, title_.c_str(), &tw, &th, 0);
Expand Down

0 comments on commit 1282653

Please sign in to comment.