Fix a few compiler warnings in GCC 9
Apparently GCC 7 is EOL in Debian testing.
This commit is contained in:
parent
f537f4943c
commit
4312be19e5
4 changed files with 8 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
||||||
#define _instance__hpp__included__
|
#define _instance__hpp__included__
|
||||||
|
|
||||||
#include "library/threads.hpp"
|
#include "library/threads.hpp"
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
class movie_logic;
|
class movie_logic;
|
||||||
class memory_space;
|
class memory_space;
|
||||||
|
@ -55,7 +56,7 @@ public:
|
||||||
{
|
{
|
||||||
entry e;
|
entry e;
|
||||||
e.ptr = ptr = reinterpret_cast<T*>(new char[sizeof(T) + 32]);
|
e.ptr = ptr = reinterpret_cast<T*>(new char[sizeof(T) + 32]);
|
||||||
memset(ptr, 0, sizeof(T) + 32);
|
memset((char*)ptr, 0, sizeof(T) + 32);
|
||||||
e.free1 = null;
|
e.free1 = null;
|
||||||
e.free2 = free2;
|
e.free2 = free2;
|
||||||
e.prev = list;
|
e.prev = list;
|
||||||
|
|
|
@ -504,7 +504,7 @@ namespace sky
|
||||||
downmix_l[i] = gain_factor * c.downmix_l[i];
|
downmix_l[i] = gain_factor * c.downmix_l[i];
|
||||||
downmix_r[i] = gain_factor * c.downmix_r[i];
|
downmix_r[i] = gain_factor * c.downmix_r[i];
|
||||||
}
|
}
|
||||||
} catch(opus::not_loaded l) {
|
} catch(opus::not_loaded& l) {
|
||||||
d = NULL;
|
d = NULL;
|
||||||
channels = c.channels;
|
channels = c.channels;
|
||||||
}
|
}
|
||||||
|
@ -556,7 +556,7 @@ namespace sky
|
||||||
try {
|
try {
|
||||||
if(d)
|
if(d)
|
||||||
d->ctl(opus::reset);
|
d->ctl(opus::reset);
|
||||||
} catch(opus::not_loaded e) {
|
} catch(opus::not_loaded& e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ namespace sky
|
||||||
void music_player::decode(std::pair<int16_t, int16_t>* output, size_t samples)
|
void music_player::decode(std::pair<int16_t, int16_t>* output, size_t samples)
|
||||||
{
|
{
|
||||||
if(!song) {
|
if(!song) {
|
||||||
memset(output, 0, samples * sizeof(std::pair<int16_t, int16_t>));
|
memset((char*)output, 0, samples * sizeof(std::pair<int16_t, int16_t>));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const subsong_transition* strans1 = &song->transitions(mem.subsong1);
|
const subsong_transition* strans1 = &song->transitions(mem.subsong1);
|
||||||
|
|
|
@ -127,8 +127,8 @@ namespace
|
||||||
P(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
|
P(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
|
||||||
for(unsigned i = 0; i < 8; i++) {
|
for(unsigned i = 0; i < 8; i++) {
|
||||||
for(unsigned j = 0; j < 4; j++) {
|
for(unsigned j = 0; j < 4; j++) {
|
||||||
b[j] |= ((a[i] >> 2*j+0) & 1) << 7-i;
|
b[j] |= ((a[i] >> (2*j+0)) & 1) << (7-i);
|
||||||
b[j] |= ((a[i] >> 2*j+1) & 1) << 15-i;
|
b[j] |= ((a[i] >> (2*j+1)) & 1) << (15-i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(unsigned i = 0; i < 4; i++) L.pushnumber(b[i]);
|
for(unsigned i = 0; i < 4; i++) L.pushnumber(b[i]);
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace
|
||||||
};
|
};
|
||||||
|
|
||||||
wxeditor_esettings_download::wxeditor_esettings_download(wxWindow* parent, emulator_instance& _inst)
|
wxeditor_esettings_download::wxeditor_esettings_download(wxWindow* parent, emulator_instance& _inst)
|
||||||
: settings_tab(parent, inst)
|
: settings_tab(parent, _inst)
|
||||||
{
|
{
|
||||||
CHECK_UI_THREAD;
|
CHECK_UI_THREAD;
|
||||||
wxSizer* top_s = new wxBoxSizer(wxVERTICAL);
|
wxSizer* top_s = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue