Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2005-04-27 15:52:50 +0400
committerKent Mein <mein@cs.umn.edu>2005-04-27 15:52:50 +0400
commit7811d7209a9ebb207979269c764831ef818521b5 (patch)
tree74504d69828bf671f179296b4ed86cff0e13cf5b
parente79db85cc18d378fc2dc6d30f0fb69d04e066f68 (diff)
Bunch of gcc 4.0 warning fixes.
source/creator/creator.c changed ifdef's around fpe_handler to match when its actually used. intern/SoundSystem/intern/SND_AudioDevice.cpp Changed: SND_SoundObject* oldobject = oldobject = pIdObject->GetSoundObject(); to: SND_SoundObject* oldobject = pIdObject->GetSoundObject(); intern/SoundSystem/openal/SND_OpenALDevice.cpp removed unused var. source/blender/blenkernel/intern/mball.c initalized a couple of vars that might have been used uninitalized. The rest were changing types to match, most of them were something like was short * should have been unsigned short *. Kent
-rw-r--r--intern/SoundSystem/intern/SND_AudioDevice.cpp6
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.cpp6
-rw-r--r--source/blender/blenkernel/intern/mball.c6
-rw-r--r--source/blender/imbuf/intern/cspace.c16
-rw-r--r--source/blender/imbuf/intern/iris.c12
-rw-r--r--source/blender/imbuf/intern/readimage.c13
-rw-r--r--source/blender/render/intern/source/edgeRender.c6
-rw-r--r--source/blender/render/intern/source/zblur.c4
-rw-r--r--source/creator/creator.c6
9 files changed, 25 insertions, 50 deletions
diff --git a/intern/SoundSystem/intern/SND_AudioDevice.cpp b/intern/SoundSystem/intern/SND_AudioDevice.cpp
index 9cb2202425c..828edaed4b4 100644
--- a/intern/SoundSystem/intern/SND_AudioDevice.cpp
+++ b/intern/SoundSystem/intern/SND_AudioDevice.cpp
@@ -32,10 +32,6 @@
#include "SND_AudioDevice.h"
#include "SND_SoundObject.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef WIN32
// This warning tells us about truncation of __long__ stl-generated names.
// It can occasionally cause DevStudio to have internal compiler warnings.
@@ -141,7 +137,7 @@ bool SND_AudioDevice::GetNewId(SND_SoundObject* pObject)
if (!OutOfIds)
{
- SND_SoundObject* oldobject = oldobject = pIdObject->GetSoundObject();
+ SND_SoundObject* oldobject = pIdObject->GetSoundObject();
// revoke the old object if present
if (oldobject)
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
index 66950e6ef92..fdad75db767 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
@@ -31,10 +31,6 @@
* SND_OpenALDevice derived from SND_IAudioDevice
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef WIN32
#pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
#endif //WIN32
@@ -402,7 +398,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
#ifdef OUDE_OPENAL
unsigned int samplerate, numberofsamples; // openal_2.12
#else
- int samplerate, numberofsamples, frequency; // openal_2.14+
+ int samplerate, numberofsamples; // openal_2.14+
#endif
/* Give them some safe defaults just incase */
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 540c81b5fc4..c5d89cd437a 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -1323,9 +1323,9 @@ void find_first_points(PROCESS *mbproc, MetaBall *mb, int a)
/* Skip, when Stiffness of MetaElement is too small ... MetaElement can't be
* visible alone ... but still can influence others MetaElements :-) */
if(f > 0.0) {
- IN.x = in.x= 0.0;
- IN.y = in.y= 0.0;
- IN.z = in.z= 0.0;
+ OUT.x = IN.x = in.x= 0.0;
+ OUT.y = IN.y = in.y= 0.0;
+ OUT.z = IN.z = in.z= 0.0;
calc_mballco(ml, (float *)&in);
in_v = mbproc->function(in.x, in.y, in.z);
diff --git a/source/blender/imbuf/intern/cspace.c b/source/blender/imbuf/intern/cspace.c
index ef2f78644d5..4fbfeb9c3c7 100644
--- a/source/blender/imbuf/intern/cspace.c
+++ b/source/blender/imbuf/intern/cspace.c
@@ -60,9 +60,9 @@ static void fillmattab(double val, unsigned short *mattab)
}
-static void cspfill(short *buf, short *fill, int x)
+static void cspfill(short *buf, unsigned short *fill, int x)
{
- short r,g,b;
+ unsigned short r,g,b;
b = fill[0];
g = fill[1];
@@ -76,7 +76,7 @@ static void cspfill(short *buf, short *fill, int x)
}
-static void cspadd(short *buf, short *cont, unsigned char *rect, int x)
+static void cspadd(short *buf, unsigned short *cont, unsigned char *rect, int x)
{
short i;
for (;x>0;x--){
@@ -120,7 +120,7 @@ static void cspret(short *buf, unsigned char *rect, int x)
}
-static void rotcspace(struct ImBuf *ibuf, short *cont_1, short *cont_2, short *cont_3, short *add)
+static void rotcspace(struct ImBuf *ibuf, unsigned short *cont_1, unsigned short *cont_2, unsigned short *cont_3, unsigned short *add)
{
short x,y,*buf;
uchar *rect;
@@ -145,11 +145,11 @@ static void rotcspace(struct ImBuf *ibuf, short *cont_1, short *cont_2, short *c
void IMB_cspace(struct ImBuf *ibuf, float mat[][4])
{
- short *cont_1,*cont_2,*cont_3,add[3];
+ unsigned short *cont_1,*cont_2,*cont_3,add[3];
- cont_1=(short *)malloc(256*3*sizeof(short));
- cont_2=(short *)malloc(256*3*sizeof(short));
- cont_3=(short *)malloc(256*3*sizeof(short));
+ cont_1=(unsigned short *)malloc(256*3*sizeof(short));
+ cont_2=(unsigned short *)malloc(256*3*sizeof(short));
+ cont_3=(unsigned short *)malloc(256*3*sizeof(short));
if (cont_1 && cont_2 && cont_3){
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 78263daa2f5..20aa9d75fd2 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -238,7 +238,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags)
unsigned int *base, *lptr = NULL;
unsigned int *zbase, *zptr;
unsigned char *rledat;
- int *starttab, *lengthtab;
+ unsigned int *starttab, *lengthtab;
FILE *inf = NULL;
IMAGE image;
int x, y, z, tablen;
@@ -277,8 +277,8 @@ struct ImBuf *imb_loadiris(unsigned char *mem, int flags)
if (rle) {
tablen = ysize*zsize*sizeof(int);
- starttab = (int *)malloc(tablen);
- lengthtab = (int *)malloc(tablen);
+ starttab = (unsigned int *)malloc(tablen);
+ lengthtab = (unsigned int *)malloc(tablen);
file_offset = 512;
readtab(inf,starttab,tablen);
@@ -482,7 +482,7 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, char
FILE *outf;
IMAGE *image;
int tablen, y, z, pos, len = 0;
- int *starttab, *lengthtab;
+ unsigned int *starttab, *lengthtab;
unsigned char *rlebuf;
unsigned int *lumbuf;
int rlebuflen, goodwrite;
@@ -494,8 +494,8 @@ static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, char
tablen = ysize*zsize*sizeof(int);
image = (IMAGE *)malloc(sizeof(IMAGE));
- starttab = (int *)malloc(tablen);
- lengthtab = (int *)malloc(tablen);
+ starttab = (unsigned int *)malloc(tablen);
+ lengthtab = (unsigned int *)malloc(tablen);
rlebuflen = 1.05*xsize+10;
rlebuf = (unsigned char *)malloc(rlebuflen);
lumbuf = (unsigned int *)malloc(xsize*sizeof(int));
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index bbb423fa2d2..4cae5cace16 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -119,17 +119,8 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) {
}
}
- /* let quicktime handle png's, skips error messages ;)
- * but only on windows
- */
-#ifdef _WIN32
- if(G.have_quicktime == FALSE) {
-#else
- if(1) {
-#endif
- ibuf = imb_loadpng((uchar *)mem, size, flags);
- if (ibuf) return(ibuf);
- }
+ ibuf = imb_loadpng((uchar *)mem, size, flags);
+ if (ibuf) return(ibuf);
ibuf = imb_bmp_decode((uchar *)mem, size, flags);
if (ibuf) return(ibuf);
diff --git a/source/blender/render/intern/source/edgeRender.c b/source/blender/render/intern/source/edgeRender.c
index 2181224871b..f065e3bfd7b 100644
--- a/source/blender/render/intern/source/edgeRender.c
+++ b/source/blender/render/intern/source/edgeRender.c
@@ -68,10 +68,6 @@
#include "zbuf.h" /* for zbufclipwire and zbufclip */
#include "jitter.h"
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef RE_EDGERENDERSAFE
char edgeRender_h[] = EDGERENDER_H;
char edgeRender_c[] = "$Id$";
@@ -574,7 +570,7 @@ void calcEdgeRenderColBuf(char* colTargetBuffer)
/* correction for osa-sampling...*/
if( osaCount != 1) {
- char *rp, *rt;
+ unsigned char *rp, *rt;
int a;
rt= colTargetBuffer;
diff --git a/source/blender/render/intern/source/zblur.c b/source/blender/render/intern/source/zblur.c
index 5432e78b144..67624d97ef4 100644
--- a/source/blender/render/intern/source/zblur.c
+++ b/source/blender/render/intern/source/zblur.c
@@ -118,7 +118,7 @@ static int free_img(Image *img)
}
/* 32 bits (int) rect to float buf */
-static void recti2imgf(int *src, Image *dest, int x, int y)
+static void recti2imgf(unsigned int *src, Image *dest, int x, int y)
{
char *from;
float *to;
@@ -192,7 +192,7 @@ static void rectf2imgf(float *src, Image *dest, int x, int y)
}
/* floatbuf back to 32 bits rect */
-static void imgf2recti(Image *src, int *dest)
+static void imgf2recti(Image *src, unsigned int *dest)
{
float *from;
char *to;
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 7eecabca456..38b9b784c88 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -32,10 +32,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
/* This little block needed for linking to Blender... */
#include "MEM_guardedalloc.h"
@@ -127,7 +123,7 @@ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */
/* Initialise callbacks for the modules that need them */
void setCallbacks(void);
-#ifndef __APPLE__
+#if defined(__sgi) || defined(__alpha__)
static void fpe_handler(int sig)
{
// printf("SIGFPE trapped\n");