diff --git a/plugins/CDVDiso/src/CMakeLists.txt b/plugins/CDVDiso/src/CMakeLists.txt index 25a841ec25..1fb3fe162e 100644 --- a/plugins/CDVDiso/src/CMakeLists.txt +++ b/plugins/CDVDiso/src/CMakeLists.txt @@ -12,7 +12,6 @@ set(Output CDVDiso) set(CommonFlags -fvisibility=hidden -Wall - -fpermissive ) set(OptimizationFlags diff --git a/plugins/CDVDiso/src/Linux/Config.cpp b/plugins/CDVDiso/src/Linux/Config.cpp index 1630943796..92da1ce65f 100644 --- a/plugins/CDVDiso/src/Linux/Config.cpp +++ b/plugins/CDVDiso/src/Linux/Config.cpp @@ -91,7 +91,7 @@ void SysMessage(char *fmt, ...) void OnFile_Ok() { - gchar *File; + const gchar *File; gtk_widget_hide(FileSel); File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); @@ -183,7 +183,7 @@ void SysMessageLoc(char *fmt, ...) void OnOk (GtkButton *button, gpointer user_data) { - char *tmp; + const char *tmp; stop = true; tmp = gtk_entry_get_text(GTK_ENTRY(Edit)); @@ -210,7 +210,7 @@ void OnCancel(GtkButton *button, gpointer user_data) void OnFileSel_Ok() { - gchar *File; + const gchar *File; File = gtk_file_selection_get_filename(GTK_FILE_SELECTION(FileSel)); gtk_entry_set_text(GTK_ENTRY(Edit), File); @@ -278,7 +278,6 @@ EXPORT_C_(void) CDVDconfigure() gtk_widget_show_all(ConfDlg); gtk_main(); - return 0; } void OnAboutOk(GtkMenuItem * menuitem, gpointer userdata) diff --git a/plugins/CDVDiso/src/Linux/Linux.cpp b/plugins/CDVDiso/src/Linux/Linux.cpp index d94105565e..0f9926dde1 100644 --- a/plugins/CDVDiso/src/Linux/Linux.cpp +++ b/plugins/CDVDiso/src/Linux/Linux.cpp @@ -45,7 +45,7 @@ void OnStop(GtkButton *button, gpointer user_data) void UpdZmode() { - char *tmp; + const char *tmp; tmp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(Method)->entry)); if (!strcmp(tmp, methods[0])) Zmode = 1; @@ -60,7 +60,7 @@ void OnCompress(GtkButton *button, gpointer user_data) u32 lsn; u8 cdbuff[10*2352]; char Zfile[256]; - char *tmp; + const char *tmp; int ret; isoFile *src; isoFile *dst; @@ -334,7 +334,7 @@ long CDR_getTD(unsigned char track, unsigned char *buffer) // byte 0 - minute // byte 1 - second // byte 2 - frame -char *CDR_readTrack(unsigned char *time) +unsigned char *CDR_readTrack(unsigned char *time) { cr.msf.cdmsf_min0 = time[0]; cr.msf.cdmsf_sec0 = time[1]; @@ -356,7 +356,7 @@ void OnCreate(GtkButton *button, gpointer user_data) unsigned char *buffer; unsigned char bufferz[2352]; unsigned char start[4], end[4]; - char *tmp; + const char *tmp; #ifdef VERBOSE unsigned long count = 0; int i = 0; @@ -495,7 +495,7 @@ void OnCreateZ(GtkButton *button, gpointer user_data) unsigned char bufferz[2352]; unsigned char start[4], end[4]; char table[256]; - char *tmp; + const char *tmp; int b, blocks; #ifdef VERBOSE unsigned long count = 0; @@ -618,7 +618,7 @@ void OnCreateZ(GtkButton *button, gpointer user_data) if (Zmode == 1) compress(Zbuf, &size, cdbuffer, CD_FRAMESIZE_RAW); else - BZ2_bzBuffToBuffCompress(Zbuf, (unsigned int*)&size, cdbuffer, CD_FRAMESIZE_RAW * 10, 1, 0, 30); + BZ2_bzBuffToBuffCompress((char*)Zbuf, (unsigned int*)&size, (char*)cdbuffer, CD_FRAMESIZE_RAW * 10, 1, 0, 30); fwrite(&c, 1, 4, t); if (Zmode == 1) fwrite(&size, 1, 2, t); diff --git a/plugins/CDVDiso/src/libiso.cpp b/plugins/CDVDiso/src/libiso.cpp index 97591936f5..b32d5602a8 100644 --- a/plugins/CDVDiso/src/libiso.cpp +++ b/plugins/CDVDiso/src/libiso.cpp @@ -166,7 +166,7 @@ int _readfile(void *handle, void *dst, int size) return ret; } -int _writefile(void *handle, void *src, int size) +int _writefile(void *handle, const void *src, int size) { DWORD ret; @@ -198,11 +198,12 @@ void *_openfile(const char *filename, int flags) u64 _tellfile(void *handle) { - s64 cursize = ftell(handle); + FILE* fp = (FILE*)handle; + s64 cursize = ftell(fp); if (cursize == -1) { // try 64bit - cursize = ftello64(handle); + cursize = ftello64(fp); if (cursize < -1) { // zero top 32 bits @@ -214,7 +215,7 @@ u64 _tellfile(void *handle) int _seekfile(void *handle, u64 offset, int whence) { - int seekerr = fseeko64(handle, offset, whence); + int seekerr = fseeko64((FILE*)handle, offset, whence); if (seekerr == -1) printf("failed to seek\n"); @@ -223,17 +224,17 @@ int _seekfile(void *handle, u64 offset, int whence) int _readfile(void *handle, void *dst, int size) { - return fread(dst, 1, size, handle); + return fread(dst, 1, size, (FILE*)handle); } -int _writefile(void *handle, void *src, int size) +int _writefile(void *handle, const void *src, int size) { - return fwrite(src, 1, size, handle); + return fwrite(src, 1, size, (FILE*)handle); } void _closefile(void *handle) { - fclose(handle); + fclose((FILE*)handle); } #endif diff --git a/plugins/CDVDiso/src/libiso.h b/plugins/CDVDiso/src/libiso.h index 48249837ba..9b19f878c1 100644 --- a/plugins/CDVDiso/src/libiso.h +++ b/plugins/CDVDiso/src/libiso.h @@ -61,7 +61,7 @@ void *_openfile(const char *filename, int flags); u64 _tellfile(void *handle); int _seekfile(void *handle, u64 offset, int whence); int _readfile(void *handle, void *dst, int size); -int _writefile(void *handle, void *src, int size); +int _writefile(void *handle, const void *src, int size); void _closefile(void *handle); #endif /* __LIBISO_H__ */