mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-22 03:19:24 +01:00
Fix warnings
This commit is contained in:
parent
87c10403ad
commit
feb9fdfc10
@ -2,12 +2,14 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/* Ugly kludge to remove warnings. This file should really be fixed instead... */
|
||||||
|
#define fread(ptr, size, nmemb, stream) do { if (fread(ptr,size,nmemb,stream) != nmemb) printf("fread failed");} while(0)
|
||||||
|
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
static long GetFilePos(int Track, int Sector)
|
static long GetFilePos(int Track, int Sector)
|
||||||
{
|
{
|
||||||
long pos;
|
long pos;
|
||||||
|
|
||||||
char buffer[256];
|
|
||||||
pos = 0;
|
pos = 0;
|
||||||
|
|
||||||
if (Track >= 1 && Track <= 17)
|
if (Track >= 1 && Track <= 17)
|
||||||
@ -96,16 +98,16 @@ const char **DirD64(const char *FileName) //mode = 0: quiet mode
|
|||||||
int cnt = 16;
|
int cnt = 16;
|
||||||
int cur = 0;
|
int cur = 0;
|
||||||
|
|
||||||
file_list = (const char**)malloc(cnt * sizeof(char*));
|
|
||||||
file_list[cur] = strdup((char*)"Empty Disc");
|
|
||||||
file_list[cur + 1] = NULL;
|
|
||||||
|
|
||||||
File = fopen(FileName, "rb");
|
File = fopen(FileName, "rb");
|
||||||
if (!File)
|
if (!File)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file_list = (const char**)malloc(cnt * sizeof(char*));
|
||||||
|
file_list[cur] = strdup((char*)"Empty Disc");
|
||||||
|
file_list[cur + 1] = NULL;
|
||||||
|
|
||||||
pos = GetFilePos(18, 0);
|
pos = GetFilePos(18, 0);
|
||||||
fseek(File, pos, SEEK_SET);
|
fseek(File, pos, SEEK_SET);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user