summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Woods <denton.woods@gmail.com>2016-12-30 11:15:57 -0600
committerDenton Woods <denton.woods@gmail.com>2016-12-30 11:15:57 -0600
commitc3eed95cf4e02c31b1522bbc05a9b6f307d42eec (patch)
treeeb571ee9dbb00a358124d6c84d00cbabbc49cedd
parent09aee11e26023d50be64e61876bb28f72e1f54a7 (diff)
downloaddevil-c3eed95cf4e02c31b1522bbc05a9b6f307d42eec.tar.gz
- Fixed string constant warnings under Linux
-rw-r--r--DevIL/src-IL/src/il_hdr.cpp2
-rw-r--r--DevIL/src-IL/src/il_ilbm.cpp30
-rw-r--r--DevIL/src-IL/src/il_io.cpp4
-rw-r--r--DevIL/src-IL/src/il_jp2.cpp2
-rw-r--r--DevIL/src-IL/src/il_png.cpp12
-rw-r--r--DevIL/src-IL/src/il_states.cpp4
-rw-r--r--DevIL/src-IL/src/il_targa.cpp4
-rw-r--r--DevIL/src-IL/src/il_tiff.cpp4
8 files changed, 31 insertions, 31 deletions
diff --git a/DevIL/src-IL/src/il_hdr.cpp b/DevIL/src-IL/src/il_hdr.cpp
index 37bd6d89..f318eab2 100644
--- a/DevIL/src-IL/src/il_hdr.cpp
+++ b/DevIL/src-IL/src/il_hdr.cpp
@@ -465,7 +465,7 @@ typedef struct {
/* default minimal header. modify if you want more information in header */
ILboolean RGBE_WriteHeader(ILuint width, ILuint height, rgbe_header_info *info)
{
- char *programtype = "RGBE";
+ char *programtype = (char*)"RGBE";
if (info && (info->valid & RGBE_VALID_PROGRAMTYPE))
programtype = (char*)info->programtype;
diff --git a/DevIL/src-IL/src/il_ilbm.cpp b/DevIL/src-IL/src/il_ilbm.cpp
index a16da706..ca13e2c1 100644
--- a/DevIL/src-IL/src/il_ilbm.cpp
+++ b/DevIL/src-IL/src/il_ilbm.cpp
@@ -262,14 +262,14 @@ static ILboolean load_ilbm(void)
start = SDL_RWtell(src);
if ( !SDL_RWread( src, id, 4, 1 ) )
{
- error="error reading IFF chunk";
+ error=(char*)"error reading IFF chunk";
goto done;
}
/* Should be the size of the file minus 4+4 ( 'FORM'+size ) */
if ( !SDL_RWread( src, &size, 4, 1 ) )
{
- error="error reading IFF chunk size";
+ error=(char*)"error reading IFF chunk size";
goto done;
}
@@ -278,13 +278,13 @@ static ILboolean load_ilbm(void)
if ( memcmp( id, "FORM", 4 ) != 0 )
{
ilSetError(IL_INVALID_FILE_HEADER);
- error="not a IFF file";
+ error=(char*)"not a IFF file";
goto done;
}
if ( !SDL_RWread( src, id, 4, 1 ) )
{
- error="error reading IFF chunk";
+ error=(char*)"error reading IFF chunk";
goto done;
}
@@ -295,7 +295,7 @@ static ILboolean load_ilbm(void)
else if ( memcmp( id, "ILBM", 4 ) )
{
ilSetError(IL_INVALID_FILE_HEADER);
- error="not a IFF picture";
+ error=(char*)"not a IFF picture";
goto done;
}
@@ -309,13 +309,13 @@ static ILboolean load_ilbm(void)
{
if ( !SDL_RWread( src, id, 4, 1 ) )
{
- error="error reading IFF chunk";
+ error=(char*)"error reading IFF chunk";
goto done;
}
if ( !SDL_RWread( src, &size, 4, 1 ) )
{
- error="error reading IFF chunk size";
+ error=(char*)"error reading IFF chunk size";
goto done;
}
@@ -327,7 +327,7 @@ static ILboolean load_ilbm(void)
{
if ( !SDL_RWread( src, &bmhd, sizeof( BMHD ), 1 ) )
{
- error="error reading BMHD chunk";
+ error=(char*)"error reading BMHD chunk";
goto done;
}
@@ -346,7 +346,7 @@ static ILboolean load_ilbm(void)
{
if ( !SDL_RWread( src, &colormap, size, 1 ) )
{
- error="error reading CMAP chunk";
+ error=(char*)"error reading CMAP chunk";
goto done;
}
@@ -359,7 +359,7 @@ static ILboolean load_ilbm(void)
Uint32 viewmodes;
if ( !SDL_RWread( src, &viewmodes, sizeof(viewmodes), 1 ) )
{
- error="error reading CAMG chunk";
+ error=(char*)"error reading CAMG chunk";
goto done;
}
@@ -403,7 +403,7 @@ static ILboolean load_ilbm(void)
if ( ( MiniBuf = (ILubyte*)malloc( bytesperline * nbplanes ) ) == NULL )
{
ilSetError( IL_OUT_OF_MEMORY );
- error="no enough memory for temporary buffer";
+ error=(char*)"not enough memory for temporary buffer";
goto done;
}
@@ -488,7 +488,7 @@ static ILboolean load_ilbm(void)
{
if ( !SDL_RWread( src, &count, 1, 1 ) )
{
- error="error reading BODY chunk";
+ error=(char*)"error reading BODY chunk";
goto done;
}
@@ -501,7 +501,7 @@ static ILboolean load_ilbm(void)
{
if( count>remainingbytes)
ilSetError(IL_ILLEGAL_FILE_VALUE );
- error="error reading BODY chunk";
+ error=(char*)"error reading BODY chunk";
goto done;
}
memset( ptr, color, count );
@@ -514,7 +514,7 @@ static ILboolean load_ilbm(void)
{
if( count>remainingbytes)
ilSetError(IL_ILLEGAL_FILE_VALUE );
- error="error reading BODY chunk";
+ error=(char*)"error reading BODY chunk";
goto done;
}
}
@@ -528,7 +528,7 @@ static ILboolean load_ilbm(void)
{
if ( !SDL_RWread( src, ptr, bytesperline, 1 ) )
{
- error="error reading BODY chunk";
+ error=(char*)"error reading BODY chunk";
goto done;
}
}
diff --git a/DevIL/src-IL/src/il_io.cpp b/DevIL/src-IL/src/il_io.cpp
index d5ce3ae5..a1ea6a98 100644
--- a/DevIL/src-IL/src/il_io.cpp
+++ b/DevIL/src-IL/src/il_io.cpp
@@ -2204,7 +2204,7 @@ ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName)
#ifndef IL_NO_CHEAD
case IL_CHEAD:
- return ilSaveCHeader(FileName, "IL_IMAGE");
+ return ilSaveCHeader(FileName, (char*)"IL_IMAGE");
#endif
#ifndef IL_NO_DDS
@@ -2554,7 +2554,7 @@ ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName)
#ifndef IL_NO_CHEAD
if (!iStrCmp(Ext, IL_TEXT("h"))) {
- bRet = ilSaveCHeader(FileName, "IL_IMAGE");
+ bRet = ilSaveCHeader(FileName, (char*)"IL_IMAGE");
goto finish;
}
#endif
diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp
index aa38c839..3d09e257 100644
--- a/DevIL/src-IL/src/il_jp2.cpp
+++ b/DevIL/src-IL/src/il_jp2.cpp
@@ -783,7 +783,7 @@ ILboolean iSaveJp2Internal()
Jp2ConvertData(Mem, Jp2Image);
// Does all of the encoding.
- if (jas_image_encode(Jp2Image, Stream, jas_image_strtofmt("jp2"), NULL)) { //@TODO: Do we want to use any options?
+ if (jas_image_encode(Jp2Image, Stream, jas_image_strtofmt((char*)"jp2"), NULL)) { //@TODO: Do we want to use any options?
jas_stream_close(Mem);
jas_stream_close(Stream);
jas_image_destroy(Jp2Image);
diff --git a/DevIL/src-IL/src/il_png.cpp b/DevIL/src-IL/src/il_png.cpp
index a589dbe8..d36c8593 100644
--- a/DevIL/src-IL/src/il_png.cpp
+++ b/DevIL/src-IL/src/il_png.cpp
@@ -650,16 +650,16 @@ ILboolean iSavePngInternal()
// Optionally write comments into the image.
imemclear(text, sizeof(png_text) * 4);
- text[0].key = "Generated by";
- text[0].text = "Generated by the Developer's Image Library (DevIL)";
+ text[0].key = (png_charp)"Generated by";
+ text[0].text = (png_charp)"Generated by the Developer's Image Library (DevIL)";
text[0].compression = PNG_TEXT_COMPRESSION_NONE;
- text[1].key = "Author";
- text[1].text = (char*)iGetString(IL_PNG_AUTHNAME_STRING); // Will not actually be modified!
+ text[1].key = (png_charp)"Author";
+ text[1].text = (png_charp)iGetString(IL_PNG_AUTHNAME_STRING); // Will not actually be modified!
text[1].compression = PNG_TEXT_COMPRESSION_NONE;
- text[2].key = "Description";
+ text[2].key = (png_charp)"Description";
text[2].text = iGetString(IL_PNG_DESCRIPTION_STRING);
text[2].compression = PNG_TEXT_COMPRESSION_NONE;
- text[3].key = "Title";
+ text[3].key = (png_charp)"Title";
text[3].text = iGetString(IL_PNG_TITLE_STRING);
text[3].compression = PNG_TEXT_COMPRESSION_NONE;
png_set_text(png_ptr, info_ptr, text, 3);
diff --git a/DevIL/src-IL/src/il_states.cpp b/DevIL/src-IL/src/il_states.cpp
index 4b516397..9a8ae526 100644
--- a/DevIL/src-IL/src/il_states.cpp
+++ b/DevIL/src-IL/src/il_states.cpp
@@ -23,7 +23,7 @@ ILconst_string _ilVendor = IL_TEXT("Abysmal Software");
ILconst_string _ilVersion = IL_TEXT("Developer's Image Library (DevIL) 1.8.0");
-char* _ilLoadExt = "" IL_BLP_EXT IL_BMP_EXT IL_CUT_EXT IL_DCX_EXT IL_DDS_EXT
+char* _ilLoadExt = (char*)"" IL_BLP_EXT IL_BMP_EXT IL_CUT_EXT IL_DCX_EXT IL_DDS_EXT
IL_DCM_EXT IL_DPX_EXT IL_EXR_EXT IL_FITS_EXT IL_FTX_EXT
IL_GIF_EXT IL_HDR_EXT IL_ICNS_EXT IL_ICO_EXT IL_IFF_EXT
IL_IWI_EXT IL_JPG_EXT IL_JP2_EXT IL_LIF_EXT IL_MDL_EXT
@@ -33,7 +33,7 @@ char* _ilLoadExt = "" IL_BLP_EXT IL_BMP_EXT IL_CUT_EXT IL_DCX_EXT IL_DDS_EXT
IL_TEX_EXT IL_TGA_EXT IL_TIF_EXT IL_TPL_EXT IL_UTX_EXT
IL_VTF_EXT IL_WAL_EXT IL_WDP_EXT IL_XPM_EXT;
-char* _ilSaveExt = "" IL_BMP_EXT IL_CHEAD_EXT IL_DDS_EXT IL_EXR_EXT
+char* _ilSaveExt = (char*)"" IL_BMP_EXT IL_CHEAD_EXT IL_DDS_EXT IL_EXR_EXT
IL_HDR_EXT IL_JP2_EXT IL_JPG_EXT IL_PCX_EXT
IL_PNG_EXT IL_PNM_EXT IL_PSD_EXT IL_RAW_EXT
IL_SGI_EXT IL_TGA_EXT IL_TIF_EXT IL_VTF_EXT
diff --git a/DevIL/src-IL/src/il_targa.cpp b/DevIL/src-IL/src/il_targa.cpp
index 55b4070f..e689ee4e 100644
--- a/DevIL/src-IL/src/il_targa.cpp
+++ b/DevIL/src-IL/src/il_targa.cpp
@@ -604,8 +604,8 @@ ILboolean iSaveTargaInternal()
ILpal *TempPal = NULL;
ILimage *TempImage = NULL;
ILuint ExtOffset, i;
- char *Footer = "TRUEVISION-XFILE.\0";
- char *idString = "Developer's Image Library (DevIL)";
+ char *Footer = (char*)"TRUEVISION-XFILE.\0";
+ char *idString = (char*)"Developer's Image Library (DevIL)";
ILuint Day, Month, Year, Hour, Minute, Second;
char *TempData;
ILshort zero_short = 0;
diff --git a/DevIL/src-IL/src/il_tiff.cpp b/DevIL/src-IL/src/il_tiff.cpp
index 6febc9c7..3f2bb68b 100644
--- a/DevIL/src-IL/src/il_tiff.cpp
+++ b/DevIL/src-IL/src/il_tiff.cpp
@@ -287,7 +287,7 @@ ILboolean iLoadTiffInternal()
//TIFFSetWarningHandler(warningHandler);
//TIFFSetErrorHandler(errorHandler);
- tif = iTIFFOpen("r");
+ tif = iTIFFOpen((char*)"r");
if (tif == NULL) {
ilSetError(IL_COULD_NOT_OPEN_FILE);
return IL_FALSE;
@@ -976,7 +976,7 @@ ILboolean iSaveTiffInternal(/*ILconst_string Filename*/)
#endif*/
// Control writing functions ourself.
- File = iTIFFOpen("w");
+ File = iTIFFOpen((char*)"w");
if (File == NULL) {
ilSetError(IL_COULD_NOT_OPEN_FILE);
return IL_FALSE;