Fix some warnings produced by enabling -Wall

This commit is contained in:
Billy Laws 2020-06-15 16:38:49 +01:00 committed by ◱ PixelyIon
parent af709efb15
commit 012be0adae
7 changed files with 10 additions and 7 deletions

View File

@ -4,7 +4,7 @@
#include "audio.h"
namespace skyline::audio {
Audio::Audio(const DeviceState &state) : state(state), oboe::AudioStreamCallback() {
Audio::Audio(const DeviceState &state) : oboe::AudioStreamCallback() {
builder.setChannelCount(constant::ChannelCount);
builder.setSampleRate(constant::SampleRate);
builder.setFormat(constant::PcmFormat);

View File

@ -16,7 +16,6 @@ namespace skyline::audio {
*/
class Audio : public oboe::AudioStreamCallback {
private:
const DeviceState &state; //!< The state of the device
oboe::AudioStreamBuilder builder; //!< The audio stream builder, used to open
oboe::ManagedStream outputStream; //!< The output oboe audio stream
std::vector<std::shared_ptr<audio::AudioTrack>> audioTracks; //!< A vector of shared_ptr to every open audio track

View File

@ -151,9 +151,9 @@ namespace skyline {
DeviceState::DeviceState(kernel::OS *os, std::shared_ptr<kernel::type::KProcess> &process, std::shared_ptr<JvmManager> jvmManager, std::shared_ptr<Settings> settings, std::shared_ptr<Logger> logger)
: os(os), jvm(std::move(jvmManager)), settings(std::move(settings)), logger(std::move(logger)), process(process) {
// We assign these later as they use the state in their constructor and we don't want null pointers
nce = std::move(std::make_shared<NCE>(*this));
gpu = std::move(std::make_shared<gpu::GPU>(*this));
audio = std::move(std::make_shared<audio::Audio>(*this));
nce = std::make_shared<NCE>(*this);
gpu = std::make_shared<gpu::GPU>(*this);
audio = std::make_shared<audio::Audio>(*this);
}
thread_local std::shared_ptr<kernel::type::KThread> DeviceState::thread = nullptr;

View File

@ -15,7 +15,7 @@ namespace skyline::kernel::ipc {
OutputBuffer::OutputBuffer(kernel::ipc::BufferDescriptorC *cBuf) : IpcBuffer(cBuf->address, cBuf->size, IpcBufferType::C) {}
IpcRequest::IpcRequest(bool isDomain, const DeviceState &state) : isDomain(isDomain), state(state) {
IpcRequest::IpcRequest(bool isDomain, const DeviceState &state) : isDomain(isDomain) {
u8 *tls = state.process->GetPointer<u8>(state.thread->tls);
u8 *pointer = tls;

View File

@ -247,7 +247,6 @@ namespace skyline {
*/
class IpcRequest {
private:
const DeviceState &state; //!< The state of the device
u8 *payloadOffset; //!< This is the offset of the data read from the payload
public:

View File

@ -41,5 +41,8 @@ namespace skyline::kernel::type {
* @return If the address is inside the memory object
*/
inline virtual bool IsInside(u64 address) = 0;
virtual ~KMemory() = default;
};
}

View File

@ -26,5 +26,7 @@ namespace skyline::kernel::type {
virtual void Signal() {
signalled = true;
}
virtual ~KSyncObject() = default;
};
}