libstrat: fix compilation without pre-compiled header/without lto
This commit is contained in:
@@ -412,6 +412,9 @@ namespace ams::htc::server::rpc {
|
||||
}
|
||||
|
||||
s32 RpcClient::GetTaskHandle(u32 task_id) {
|
||||
/* TODO: Why is this necessary to avoid a bogus array-bounds warning? */
|
||||
AMS_ASSUME(task_id < MaxRpcCount);
|
||||
|
||||
/* Check pre-conditions. */
|
||||
AMS_ASSERT(m_task_active[task_id]);
|
||||
AMS_ASSERT(m_is_htcs_task[task_id]);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace ams::lm {
|
||||
/* Send libnx command. */
|
||||
::Service logger_srv;
|
||||
{
|
||||
u64 pid_placeholder;
|
||||
u64 pid_placeholder = 0;
|
||||
|
||||
#define NX_SERVICE_ASSUME_NON_DOMAIN
|
||||
R_TRY(serviceDispatchIn(&m_srv, 0, pid_placeholder,
|
||||
|
||||
@@ -70,15 +70,18 @@ namespace ams::mem::impl {
|
||||
uintptr_t addr;
|
||||
if (IsVirtualAddressMemoryEnabled()) {
|
||||
/* TODO: Support virtual address memory. */
|
||||
AMS_UNUSED(ptr);
|
||||
AMS_ABORT("Virtual address memory not supported yet");
|
||||
} else {
|
||||
if (auto err = ConvertResult(os::AllocateMemoryBlock(std::addressof(addr), util::AlignUp(size, os::MemoryBlockUnitSize))); err != 0) {
|
||||
return err;
|
||||
}
|
||||
|
||||
os::SetMemoryPermission(addr, size, os::MemoryPermission_None);
|
||||
}
|
||||
|
||||
/* Set the output pointer. */
|
||||
*ptr = reinterpret_cast<void *>(addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ namespace ams::ncm {
|
||||
|
||||
/* Automatically choose a suitable storage id. */
|
||||
auto reader = content_meta.GetReader();
|
||||
StorageId storage_id;
|
||||
StorageId storage_id = StorageId::None;
|
||||
if (reader.GetStorageId() != StorageId::None) {
|
||||
storage_id = reader.GetStorageId();
|
||||
} else {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
namespace ams::os::impl {
|
||||
|
||||
template<std::unsigned_integral AddressType, std::unsigned_integral SizeType>
|
||||
AddressSpaceAllocatorBase<AddressType, SizeType>::AddressSpaceAllocatorBase(u64 start_address, u64 end_address, SizeType guard_size, const AddressSpaceAllocatorForbiddenRegion *forbidden_regions, size_t num_forbidden_regions) : m_critical_section() {
|
||||
AddressSpaceAllocatorBase<AddressType, SizeType>::AddressSpaceAllocatorBase(u64 start_address, u64 end_address, SizeType guard_size, const AddressSpaceAllocatorForbiddenRegion *forbidden_regions, size_t num_forbidden_regions) : m_critical_section(), m_forbidden_region_count(0) {
|
||||
/* Check pre-conditions. */
|
||||
AMS_ASSERT(start_address >= guard_size);
|
||||
AMS_ASSERT(end_address + guard_size >= end_address);
|
||||
|
||||
Reference in New Issue
Block a user