Patch for compiling with gcc 6.2.0

This commit is contained in:
Fabio Olimpieri 2017-01-08 17:02:17 +01:00
parent 4ba5d3be95
commit 057101b8de
4 changed files with 9 additions and 8 deletions

View File

@ -185,7 +185,7 @@ bool ImageDrive::change_image(const char *path)
// Determine file type and fill in image_file_desc structure
if (!parse_image_file(the_file, desc)) {
fclose(the_file);
the_file = false;
the_file = NULL;
return false;
}

View File

@ -330,7 +330,7 @@ private:
static const uint16 TriSawRectTable[0x100];
static const uint32 EGTable[16]; // Increment/decrement values for all A/D/R settings
static const uint8 EGDRShift[256]; // For exponential approximation of D/R
static const int16 SampleTab[16]; // Table for sampled voice
static const uint16 SampleTab[16]; // Table for sampled voice
DRVoice voice[3]; // Data for 3 voices
@ -682,7 +682,7 @@ const uint8 DigitalRenderer::EGDRShift[256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
const int16 DigitalRenderer::SampleTab[16] = {
const uint16 DigitalRenderer::SampleTab[16] = {
0x8000, 0x9111, 0xa222, 0xb333, 0xc444, 0xd555, 0xe666, 0xf777,
0x0888, 0x1999, 0x2aaa, 0x3bbb, 0x4ccc, 0x5ddd, 0x6eee, 0x7fff,
};

View File

@ -134,7 +134,7 @@ bool InitNetwork()
memset(myIP, 0, sizeof(myIP));
printf("Getting IP address via DHCP...\n\n");
if (if_config(myIP, NULL, NULL, true) < 0) {
if (if_config(myIP, NULL, NULL, true, 10) < 0) {
printf("No DHCP reply\n\n");
return false;
}

View File

@ -134,12 +134,13 @@ typedef int int16;
#error No 2 byte type, you lose.
#endif
#if SIZEOF_INT == 4
typedef unsigned int uint32;
typedef int int32;
#elif SIZEOF_LONG == 4
#if SIZEOF_LONG == 4
typedef unsigned long uint32;
typedef long int32;
#elif SIZEOF_INT == 4
typedef unsigned int uint32;
typedef int int32;
#else
#error No 4 byte type, you lose.
#endif