Done with gcc (linux).

To take with precaution. My first language is java, not C.

Resolved by checking type and cast mostly.

patch made with svn diff under root directory.

cyril

--
Lorsque l'homme aura coupé le dernier arbre,
pollué la dernière goutte d'eau,
tué le dernier animal et pêché le dernier poisson,
alors il se rendra compte que l'argent n'est pas comestible
Index: lib/ivis_common/imdload.c
===================================================================
--- lib/ivis_common/imdload.c   (révision 190)
+++ lib/ivis_common/imdload.c   (copie de travail)
@@ -120,7 +120,7 @@
                }
        }
 
-       res = loadFile(_IMD_NAME,&pFileData, &FileSize);
+       res = loadFile(_IMD_NAME,(UBYTE**)&pFileData, &FileSize);
        if (res == FALSE) {
                iV_Error(0xff,"(iv_IMDLoad) unable to load file");
                return NULL;
Index: lib/widget/form.c
===================================================================
--- lib/widget/form.c   (révision 190)
+++ lib/widget/form.c   (copie de travail)
@@ -1128,7 +1128,7 @@
                                        {
                                                /* Got a tip - start it off */
                                                tipStart((WIDGET *)psTabForm, 
pTip,
-                                                                
psContext->psScreen->TipFontID, psTabForm->aColours,
+                                                                
psContext->psScreen->TipFontID, (UDWORD*)psTabForm->aColours,
                                                                 sTabPos.x + 
psContext->xOffset,
                                                                 sTabPos.y + 
psContext->yOffset,
                                                                 
sTabPos.width,sTabPos.height);
@@ -1262,7 +1262,7 @@
                if (psClickForm->pTip)
                {
                        tipStart((WIDGET *)psClickForm, psClickForm->pTip,
-                                        psContext->psScreen->TipFontID, 
psContext->psForm->aColours,
+                                        psContext->psScreen->TipFontID, 
(UDWORD*)psContext->psForm->aColours,
                                         psWidget->x + psContext->xOffset, 
psWidget->y + psContext->yOffset,
                                         psWidget->width, psWidget->height);
                }
@@ -1632,7 +1632,7 @@
 //     }
 
        if(psForm->pFormDisplay) {
-               psForm->pFormDisplay((WIDGET *)psForm, xOffset, yOffset, 
psForm->aColours);
+               psForm->pFormDisplay((WIDGET *)psForm, xOffset, yOffset, 
(UDWORD*)psForm->aColours);
        } else {
        //      screenSetLineColour(0,0,0);
                /* Draw the form outline */
Index: lib/widget/bar.c
===================================================================
--- lib/widget/bar.c    (révision 190)
+++ lib/widget/bar.c    (copie de travail)
@@ -239,7 +239,7 @@
        if (psWidget->pTip)
        {
                tipStart((WIDGET *)psWidget, psWidget->pTip, 
psContext->psScreen->TipFontID,
-                                psContext->psForm->aColours,
+                                (UDWORD*)psContext->psForm->aColours,
                                 psWidget->x + psContext->xOffset, psWidget->y 
+ psContext->yOffset,
                                 psWidget->width, psWidget->height);
        }
Index: lib/widget/scrap.c
===================================================================
--- lib/widget/scrap.c  (révision 190)
+++ lib/widget/scrap.c  (copie de travail)
@@ -346,7 +346,7 @@
       Lock_Display();
       convert_data(type, dst, src, srclen);
       XChangeProperty(SDL_Display, DefaultRootWindow(SDL_Display),
-        XA_CUT_BUFFER0, format, 8, PropModeReplace, dst, dstlen);
+        XA_CUT_BUFFER0, format, 8, PropModeReplace, (unsigned char*)dst, 
dstlen);
       free(dst);
       if ( lost_scrap() )
         XSetSelectionOwner(SDL_Display, XA_PRIMARY, SDL_Window, CurrentTime);
Index: lib/widget/button.c
===================================================================
--- lib/widget/button.c (révision 190)
+++ lib/widget/button.c (copie de travail)
@@ -309,7 +309,7 @@
        if (psWidget->pTip)
        {
                tipStart((WIDGET *)psWidget, psWidget->pTip, 
psContext->psScreen->TipFontID,
-                                psContext->psForm->aColours,
+                                (UDWORD*)psContext->psForm->aColours,
                                 psWidget->x + psContext->xOffset, psWidget->y 
+ psContext->yOffset,
                                 psWidget->width,psWidget->height);
        }
Index: lib/widget/label.c
===================================================================
--- lib/widget/label.c  (révision 190)
+++ lib/widget/label.c  (copie de travail)
@@ -164,7 +164,7 @@
        if (psWidget->pTip)
        {
                tipStart((WIDGET *)psWidget, psWidget->pTip, 
psContext->psScreen->TipFontID,
-                                psContext->psForm->aColours,
+                                (UDWORD*)psContext->psForm->aColours,
                                 psWidget->x + psContext->xOffset, psWidget->y 
+ psContext->yOffset,
                                 psWidget->width,psWidget->height);
        }
Index: lib/widget/widget.c
===================================================================
--- lib/widget/widget.c (révision 190)
+++ lib/widget/widget.c (copie de travail)
@@ -1631,7 +1631,7 @@
 
 
        /* Display the form */
-       psForm->display((WIDGET *)psForm, xOffset, yOffset, psForm->aColours);
+       psForm->display((WIDGET *)psForm, xOffset, yOffset, 
(UDWORD*)psForm->aColours);
        if(psForm->disableChildren == TRUE) {
                return;
        }
@@ -1667,7 +1667,7 @@
                }
                else
                {
-                       psCurr->display(psCurr, xOffset, yOffset, 
psForm->aColours);
+                       psCurr->display(psCurr, xOffset, yOffset, 
(UDWORD*)psForm->aColours);
                }
        }
 }
Index: lib/sound/openal_track.c
===================================================================
--- lib/sound/openal_track.c    (révision 190)
+++ lib/sound/openal_track.c    (copie de travail)
@@ -361,7 +361,7 @@
 //
 BOOL sound_ReadTrackFromFile( TRACK *psTrack, signed char szFileName[] )
 {
-       PHYSFS_file * f = PHYSFS_openRead(szFileName);
+       PHYSFS_file * f = PHYSFS_openRead((char*)szFileName);
        static char* buffer = NULL;
        static unsigned int buffer_size = 0;
        unsigned int size;
Index: lib/framework/configfile.c
===================================================================
--- lib/framework/configfile.c  (révision 190)
+++ lib/framework/configfile.c  (copie de travail)
@@ -169,7 +169,7 @@
        }
 
        debug(LOG_WZ, "Parsing the registry from %s", filename);
-       if (filesize == 0 || strlen(bptr) == 0) {
+       if (filesize == 0 || strlen((SBYTE *)bptr) == 0) {
                debug(LOG_ERROR, "Registry file %s is empty!", filename);
                return FALSE;
        }
Index: lib/framework/mem.h
===================================================================
--- lib/framework/mem.h (révision 190)
+++ lib/framework/mem.h (copie de travail)
@@ -61,7 +61,7 @@
 #ifdef DEBUG_MALLOC
 
 #define MALLOC(size)           memMalloc(__FILE__, __LINE__, size)
-#define FREE(ptr)              { void** p = &(ptr); memFree(__FILE__, 
__LINE__, *p); *p = NULL; }
+#define FREE(ptr)              { void** p = (void**)&(ptr); memFree(__FILE__, 
__LINE__, *p); *p = NULL; }
 #ifndef NO_PTRVALID
 #define PTRVALID(ptr, size)    memPointerValid(ptr, size) 
 #else
Index: lib/ivis_opengl/piematrix.c
===================================================================
--- lib/ivis_opengl/piematrix.c (révision 190)
+++ lib/ivis_opengl/piematrix.c (copie de travail)
@@ -362,13 +362,13 @@
 
        if ((zfx<=0) || (zfy<=0))
        {
-               xs = LONG_WAY;//just along way off screen
-               ys = LONG_WAY;
+               xs = (SDWORD*)LONG_WAY;//just along way off screen
+               ys = (SDWORD*)LONG_WAY;
        }
        else if (zz < MIN_STRETCHED_Z)
        {
-               xs = LONG_WAY;//just along way off screen
-               ys = LONG_WAY;
+               xs = (SDWORD*)LONG_WAY;//just along way off screen
+               ys = (SDWORD*)LONG_WAY;
        }
        else
        {
Index: lib/ivis_opengl/screen.c
===================================================================
--- lib/ivis_opengl/screen.c    (révision 190)
+++ lib/ivis_opengl/screen.c    (copie de travail)
@@ -440,7 +440,7 @@
        uintptr_t tmp;
        JSAMPARRAY ptr[1];
        struct jpeg_source_mgr jsrc;
-       char *buffer;
+       UBYTE *buffer;
        UDWORD fsize;
 
        if (image == NULL) return TRUE;
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to