Skip to content

Commit aa94867

Browse files
committed
Warning fixes
1 parent 640eb1f commit aa94867

File tree

9 files changed

+25
-26
lines changed

9 files changed

+25
-26
lines changed

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ if(NOT MSVC)
377377
add_definitions(-Wno-nullability-completeness)
378378
add_definitions(-Wno-tautological-pointer-compare)
379379
add_definitions(-Wno-deprecated-register)
380+
add_definitions(-Wno-sign-conversion)
381+
add_definitions(-Wno-shorten-64-to-32)
380382
endif()
381383

382384
if(USE_ASAN)
@@ -432,11 +434,7 @@ if(NOT MSVC)
432434
endif()
433435

434436
if(IOS)
435-
if(IOS_APP_STORE)
436-
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
437-
else()
438-
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
439-
endif()
437+
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
440438
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
441439
if(LIBRETRO AND ARM64)
442440
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")

Core/FileSystems/DirectoryFileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ size_t DirectoryFileHandle::Seek(s32 position, FileMove type)
382382
// The actual, underlying file hasn't been truncated (yet.)
383383
if (type == FILEMOVE_END) {
384384
type = FILEMOVE_BEGIN;
385-
position = needsTrunc_ + position;
385+
position = (s32)(needsTrunc_ + position);
386386
}
387387
}
388388

Core/FileSystems/VirtualDiscFileSystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void VirtualDiscFileSystem::LoadFileListIndex() {
135135
if (trunc != entry.fileName.npos && trunc != entry.fileName.size())
136136
entry.fileName.resize(trunc + 1);
137137

138-
entry.firstBlock = strtol(line.c_str(), NULL, 16);
138+
entry.firstBlock = (u32)strtol(line.c_str(), NULL, 16);
139139
if (entry.handler != NULL && entry.handler->IsValid()) {
140140
HandlerFileHandle temp = entry.handler;
141141
if (temp.Open(basePath.ToString(), entry.fileName, FILEACCESS_READ)) {

Core/HLE/proAdhoc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ void sendChat(const std::string &chatString) {
13221322
strcpy(chat.message, message.c_str());
13231323
//Send Chat Messages
13241324
if (IsSocketReady((int)metasocket, false, true) > 0) {
1325-
int chatResult = send((int)metasocket, (const char*)&chat, sizeof(chat), MSG_NOSIGNAL);
1325+
int chatResult = (int)send((int)metasocket, (const char*)&chat, sizeof(chat), MSG_NOSIGNAL);
13261326
NOTICE_LOG(SCENET, "Send Chat %s to Adhoc Server", chat.message);
13271327
std::string name = g_Config.sNickName;
13281328

@@ -1437,7 +1437,7 @@ int friendFinder(){
14371437

14381438
// Send Ping to Server, may failed with socket error 10054/10053 if someone else with the same IP already connected to AdHoc Server (the server might need to be modified to differentiate MAC instead of IP)
14391439
if (IsSocketReady((int)metasocket, false, true) > 0) {
1440-
int iResult = send((int)metasocket, (const char*)&opcode, 1, MSG_NOSIGNAL);
1440+
int iResult = (int)send((int)metasocket, (const char*)&opcode, 1, MSG_NOSIGNAL);
14411441
int error = errno;
14421442
// KHBBS seems to be getting error 10053 often
14431443
if (iResult == SOCKET_ERROR) {
@@ -1464,7 +1464,7 @@ int friendFinder(){
14641464

14651465
// Check for Incoming Data
14661466
if (IsSocketReady((int)metasocket, true, false) > 0) {
1467-
int received = recv((int)metasocket, (char*)(rx + rxpos), sizeof(rx) - rxpos, MSG_NOSIGNAL);
1467+
int received = (int)recv((int)metasocket, (char*)(rx + rxpos), sizeof(rx) - rxpos, MSG_NOSIGNAL);
14681468

14691469
// Free Network Lock
14701470
//_freeNetworkLock();
@@ -2262,7 +2262,7 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
22622262

22632263
IsSocketReady((int)metasocket, false, true, nullptr, adhocDefaultTimeout);
22642264
DEBUG_LOG(SCENET, "InitNetwork: Sending LOGIN OPCODE %d", packet.base.opcode);
2265-
int sent = send((int)metasocket, (char*)&packet, sizeof(packet), MSG_NOSIGNAL);
2265+
int sent = (int)send((int)metasocket, (char*)&packet, sizeof(packet), MSG_NOSIGNAL);
22662266
if (sent > 0) {
22672267
socklen_t addrLen = sizeof(LocalIP);
22682268
memset(&LocalIP, 0, addrLen);

Core/HLE/proAdhocServer.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ void connect_user(SceNetAdhocctlUserNode * user, SceNetAdhocctlGroupName * group
859859
packet.ip = user->resolver.ip;
860860

861861
// Send Data
862-
int iResult = send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
862+
int iResult = (int)send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
863863
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: connect_user[send peer] (Socket error %d)", errno);
864864

865865
// Set Player Name
@@ -872,7 +872,7 @@ void connect_user(SceNetAdhocctlUserNode * user, SceNetAdhocctlGroupName * group
872872
packet.ip = peer->resolver.ip;
873873

874874
// Send Data
875-
iResult = send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
875+
iResult = (int)send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
876876
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: connect_user[send user] (Socket error %d)", errno);
877877

878878
// Set BSSID
@@ -894,7 +894,7 @@ void connect_user(SceNetAdhocctlUserNode * user, SceNetAdhocctlGroupName * group
894894
g->playercount++;
895895

896896
// Send Network BSSID to User
897-
int iResult = send(user->stream, (const char*)&bssid, sizeof(bssid), MSG_NOSIGNAL);
897+
int iResult = (int)send(user->stream, (const char*)&bssid, sizeof(bssid), MSG_NOSIGNAL);
898898
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: connect_user[send user bssid] (Socket error %d)", errno);
899899

900900
// Notify User
@@ -986,7 +986,7 @@ void disconnect_user(SceNetAdhocctlUserNode * user)
986986
packet.ip = user->resolver.ip;
987987

988988
// Send Data
989-
int iResult = send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
989+
int iResult = (int)send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
990990
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: disconnect_user[send peer] (Socket error %d)", errno);
991991

992992
// Move Pointer
@@ -1085,13 +1085,13 @@ void send_scan_results(SceNetAdhocctlUserNode * user)
10851085
}
10861086

10871087
// Send Group Packet
1088-
int iResult = send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
1088+
int iResult = (int)send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
10891089
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: send_scan_result[send user] (Socket error %d)", errno);
10901090
}
10911091

10921092
// Notify Player of End of Scan
10931093
uint8_t opcode = OPCODE_SCAN_COMPLETE;
1094-
int iResult = send(user->stream, (const char*)&opcode, 1, MSG_NOSIGNAL);
1094+
int iResult = (int)send(user->stream, (const char*)&opcode, 1, MSG_NOSIGNAL);
10951095
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: send_scan_result[send peer complete] (Socket error %d)", errno);
10961096

10971097
// Notify User
@@ -1150,7 +1150,7 @@ void spread_message(SceNetAdhocctlUserNode *user, const char *message)
11501150
strcpy(packet.base.message, message);
11511151

11521152
// Send Data
1153-
int iResult = send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
1153+
int iResult = (int)send(user->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
11541154
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: spread_message[send user chat] (Socket error %d)", errno);
11551155
}
11561156
}
@@ -1192,7 +1192,7 @@ void spread_message(SceNetAdhocctlUserNode *user, const char *message)
11921192
packet.name = user->resolver.name;
11931193

11941194
// Send Data
1195-
int iResult = send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
1195+
int iResult = (int)send(peer->stream, (const char*)&packet, sizeof(packet), MSG_NOSIGNAL);
11961196
if (iResult < 0) ERROR_LOG(SCENET, "AdhocServer: spread_message[send peer chat] (Socket error %d)", errno);
11971197

11981198
// Move Pointer
@@ -1939,7 +1939,7 @@ int server_loop(int server)
19391939
SceNetAdhocctlUserNode * next = user->next;
19401940

19411941
// Receive Data from User
1942-
int recvresult = recv(user->stream, (char*)user->rx + user->rxpos, sizeof(user->rx) - user->rxpos, MSG_NOSIGNAL);
1942+
int recvresult = (int)recv(user->stream, (char*)user->rx + user->rxpos, sizeof(user->rx) - user->rxpos, MSG_NOSIGNAL);
19431943

19441944
// Connection Closed or Timed Out
19451945
if(recvresult == 0 || (recvresult == -1 && errno != EAGAIN && errno != EWOULDBLOCK) || get_user_state(user) == USER_STATE_TIMED_OUT)

cmake/Toolchains/ios.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# PPSSPP platform flags
1313
set(MOBILE_DEVICE ON)
1414
set(USING_GLES2 ON)
15-
set(IPHONEOS_DEPLOYMENT_TARGET 11.0)
15+
set(IPHONEOS_DEPLOYMENT_TARGET 12.0)
1616
add_definitions(
1717
-DGL_ETC1_RGB8_OES=0
1818
-U__STRICT_ANSI__

ios/PPSSPP-AppStore.plist

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<true/>
3333
<key>UIViewControllerBasedStatusBarAppearance</key>
3434
<false/>
35+
<key>UIRequiresFullScreen</key>
36+
<true/>
3537
<key>UIRequiredDeviceCapabilities</key>
3638
<array>
3739
<string>arm64</string>
@@ -59,11 +61,6 @@
5961
<string>Default.png</string>
6062
<key>UIFileSharingEnabled</key>
6163
<true/>
62-
<key>UIDeviceFamily</key>
63-
<array>
64-
<integer>1</integer>
65-
<integer>2</integer>
66-
</array>
6764
<key>UILaunchStoryboardName</key>
6865
<string>Launch Screen</string>
6966
<key>CFBundleDocumentTypes</key>

ios/PPSSPP-AppStoreGold.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<true/>
3333
<key>UIViewControllerBasedStatusBarAppearance</key>
3434
<false/>
35+
<key>UIRequiresFullScreen</key>
36+
<true/>
3537
<key>UIRequiredDeviceCapabilities</key>
3638
<array>
3739
<string>arm64</string>

ios/macbundle.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ else
1818
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Info.plist
1919
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Info.plist
2020
fi
21+
22+
echo "macbundle.sh: Updated ${PPSSPP}/Info.plist"

0 commit comments

Comments
 (0)