mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-17 15:06:49 +00:00
Fixes for gcc 10.3.0 (#112)
* Fixes for gcc 10.3.0 * Fixes for gcc 10.3.0 * Removed obsolete declaration * Changes based on review
This commit is contained in:
parent
88f59a6f1e
commit
7e45d11215
@ -162,7 +162,9 @@ BOOL FASTCALL DiskTrack::Load(const Filepath& path)
|
||||
|
||||
if (dt.buffer == NULL) {
|
||||
#if defined(RASCSI) && !defined(BAREMETAL)
|
||||
posix_memalign((void **)&dt.buffer, 512, ((length + 511) / 512) * 512);
|
||||
if (posix_memalign((void **)&dt.buffer, 512, ((length + 511) / 512) * 512)) {
|
||||
LOGWARN("%s posix_memalign failed", __PRETTY_FUNCTION__);
|
||||
}
|
||||
#else
|
||||
dt.buffer = (BYTE *)malloc(length * sizeof(BYTE));
|
||||
#endif // RASCSI && !BAREMETAL
|
||||
@ -177,7 +179,9 @@ BOOL FASTCALL DiskTrack::Load(const Filepath& path)
|
||||
if (dt.length != (DWORD)length) {
|
||||
free(dt.buffer);
|
||||
#if defined(RASCSI) && !defined(BAREMETAL)
|
||||
posix_memalign((void **)&dt.buffer, 512, ((length + 511) / 512) * 512);
|
||||
if (posix_memalign((void **)&dt.buffer, 512, ((length + 511) / 512) * 512)) {
|
||||
LOGWARN("%s posix_memalign failed", __PRETTY_FUNCTION__);
|
||||
}
|
||||
#else
|
||||
dt.buffer = (BYTE *)malloc(length * sizeof(BYTE));
|
||||
#endif // RASCSI && !BAREMETAL
|
||||
|
@ -206,24 +206,6 @@ void FASTCALL Filepath::Split()
|
||||
free(pBase);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// パス合成
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
void FASTCALL Filepath::Make()
|
||||
{
|
||||
ASSERT(this);
|
||||
|
||||
// パス初期化
|
||||
m_szPath[0] = _T('\0');
|
||||
|
||||
// 合成
|
||||
strncat(m_szPath, m_szDir, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
|
||||
strncat(m_szPath, m_szFile, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
|
||||
strncat(m_szPath, m_szExt, ARRAY_SIZE(m_szPath) - strlen(m_szPath));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// クリアされているか
|
||||
|
@ -59,8 +59,6 @@ public:
|
||||
private:
|
||||
void FASTCALL Split();
|
||||
// パス分割
|
||||
void FASTCALL Make();
|
||||
// パス合成
|
||||
void FASTCALL SetCurDir();
|
||||
// カレントディレクトリ設定
|
||||
TCHAR m_szPath[_MAX_PATH];
|
||||
|
@ -1242,10 +1242,14 @@ int FASTCALL GPIOBUS::PollSelectEvent()
|
||||
struct gpioevent_data gpev;
|
||||
|
||||
if (epoll_wait(epfd, &epev, 1, -1) <= 0) {
|
||||
LOGWARN("%s epoll_wait failed", __PRETTY_FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
(void)read(selevreq.fd, &gpev, sizeof(gpev));
|
||||
if (read(selevreq.fd, &gpev, sizeof(gpev)) < 0) {
|
||||
LOGWARN("%s read failed", __PRETTY_FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
#endif // BAREMETAL
|
||||
|
||||
return 0;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "rascsi_version.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include <sys/time.h>
|
||||
#include <climits>
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user