diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-03-17 17:46:04 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-03-17 17:46:04 +0300 |
commit | 83e72cc813d8df8c5d0b2cb6e6e92e324c28787e (patch) | |
tree | 6b9507b1c05a3d48945e750581fb8f147c2b4bc4 /source | |
parent | 8e43b3f950430d345e35d7643faaaf4b6122c961 (diff) |
Fix various gcc warning, unused variables and incorrect type passed to
*printf functions.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/util.c | 9 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/dpxlib.c | 38 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Curve.c | 1 | ||||
-rw-r--r-- | source/blender/src/edit.c | 2 |
4 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 77ab4d67783..e4fc9cc92f9 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -741,10 +741,9 @@ void BLI_makestringcode(const char *relfile, char *file) char * p; char * q; char * lslash; - int len=0; char temp[FILE_MAXDIR+FILE_MAXFILE]; char res[FILE_MAXDIR+FILE_MAXFILE]; - + /* if file is already relative, bail out */ if(file[0]=='/' && file[1]=='/') return; @@ -823,7 +822,7 @@ void BLI_makestringcode(const char *relfile, char *file) int BLI_convertstringcode(char *path, const char *basepath, int framenum) { - int len, wasrelative, is_filepath; + int len, wasrelative; char tmp[FILE_MAXDIR+FILE_MAXFILE]; char base[FILE_MAXDIR]; char vol[3] = {'\0', '\0', '\0'}; @@ -1147,8 +1146,10 @@ int BLI_testextensie(const char *str, const char *ext) void BLI_split_dirfile(const char *string, char *dir, char *file) { int a; +#ifdef WIN32 int sl; short is_relative = 0; +#endif dir[0]= 0; file[0]= 0; @@ -1227,7 +1228,7 @@ void BLI_split_dirfile(const char *string, char *dir, char *file) BLI_getwdN(dir); strcat(dir,"/"); strcat(dir,string); - strcpy(string,dir); + strcpy((char *)string,dir); } BLI_make_exist(dir); diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c index bb12f9307e3..b769d1e6132 100644 --- a/source/blender/imbuf/intern/cineon/dpxlib.c +++ b/source/blender/imbuf/intern/cineon/dpxlib.c @@ -58,15 +58,15 @@ fillDpxChannelInfo(DpxFile* dpx, DpxChannelInformation* chan, int des) { static void dumpDpxChannelInfo(DpxChannelInformation* chan) { - d_printf(" Signage %ld", ntohl(chan->signage)); - d_printf(" Ref low data %ld\n", ntohl(chan->ref_low_data)); + d_printf(" Signage %ld", (long)ntohl(chan->signage)); + d_printf(" Ref low data %ld\n", (long)ntohl(chan->ref_low_data)); d_printf(" Ref low quantity %f\n", ntohf(chan->ref_low_quantity)); - d_printf(" Ref high data %ld\n", ntohl(chan->ref_high_data)); + d_printf(" Ref high data %ld\n", (long)ntohl(chan->ref_high_data)); d_printf(" Ref high quantity %f\n", ntohf(chan->ref_high_quantity)); d_printf(" Designator1: %d,", chan->designator1); d_printf(" Bits per pixel %d\n", chan->bits_per_pixel); d_printf(" Packing: %d,", ntohs(chan->packing)); - d_printf(" Data Offset: %ld,", ntohl(chan->data_offset)); + d_printf(" Data Offset: %ld,", (long)ntohl(chan->data_offset)); } static void @@ -109,20 +109,20 @@ fillDpxFileInfo( static void dumpDpxFileInfo(DpxFileInformation* fileInfo) { d_printf("\n--File Information--\n"); - d_printf("Magic: %8.8lX\n", ntohl(fileInfo->magic_num)); - d_printf("Image Offset %ld\n", ntohl(fileInfo->offset)); + d_printf("Magic: %8.8lX\n", (unsigned long)ntohl(fileInfo->magic_num)); + d_printf("Image Offset %ld\n", (long)ntohl(fileInfo->offset)); d_printf("Version \"%s\"\n", fileInfo->vers); - d_printf("File size %ld\n", ntohl(fileInfo->file_size)); - d_printf("Ditto key %ld\n", ntohl(fileInfo->ditto_key)); - d_printf("Generic Header size %ld\n", ntohl(fileInfo->gen_hdr_size)); - d_printf("Industry Header size %ld\n", ntohl(fileInfo->ind_hdr_size)); - d_printf("User Data size %ld\n", ntohl(fileInfo->user_data_size)); + d_printf("File size %ld\n", (long)ntohl(fileInfo->file_size)); + d_printf("Ditto key %ld\n", (long)ntohl(fileInfo->ditto_key)); + d_printf("Generic Header size %ld\n", (long)ntohl(fileInfo->gen_hdr_size)); + d_printf("Industry Header size %ld\n", (long)ntohl(fileInfo->ind_hdr_size)); + d_printf("User Data size %ld\n", (long)ntohl(fileInfo->user_data_size)); d_printf("File name \"%s\"\n", fileInfo->file_name); d_printf("Creation date \"%s\"\n", fileInfo->create_date); d_printf("Creator \"%s\"\n", fileInfo->creator); d_printf("Project \"%s\"\n", fileInfo->project); d_printf("Copyright \"%s\"\n", fileInfo->copyright); - d_printf("Key %ld\n", ntohl(fileInfo->key)); + d_printf("Key %ld\n", (long)ntohl(fileInfo->key)); } static void @@ -150,8 +150,8 @@ dumpDpxImageInfo(DpxImageInformation* imageInfo) { d_printf("Image orientation %d,", ntohs(imageInfo->orientation)); n = ntohs(imageInfo->channels_per_image); d_printf("Channels %d\n", n); - d_printf("Pixels per line %ld\n", ntohl(imageInfo->pixels_per_line)); - d_printf("Lines per image %ld\n", ntohl(imageInfo->lines_per_image)); + d_printf("Pixels per line %ld\n", (long)ntohl(imageInfo->pixels_per_line)); + d_printf("Lines per image %ld\n", (long)ntohl(imageInfo->lines_per_image)); for (i = 0; i < n; ++i) { d_printf(" --Channel %d--\n", i); dumpDpxChannelInfo(&imageInfo->channel[i]); @@ -166,12 +166,12 @@ fillDpxOriginationInfo( static void dumpDpxOriginationInfo(DpxOriginationInformation* originInfo) { d_printf("\n--Origination Information--\n"); - d_printf("X offset %ld\n", ntohl(originInfo->x_offset)); - d_printf("Y offset %ld\n", ntohl(originInfo->y_offset)); + d_printf("X offset %ld\n", (long)ntohl(originInfo->x_offset)); + d_printf("Y offset %ld\n", (long)ntohl(originInfo->y_offset)); d_printf("X centre %f\n", ntohf(originInfo->x_centre)); d_printf("Y centre %f\n", ntohf(originInfo->y_centre)); - d_printf("Original X %ld\n", ntohl(originInfo->x_original_size)); - d_printf("Original Y %ld\n", ntohl(originInfo->y_original_size)); + d_printf("Original X %ld\n", (long)ntohl(originInfo->x_original_size)); + d_printf("Original Y %ld\n", (long)ntohl(originInfo->y_original_size)); d_printf("File name \"%s\"\n", originInfo->file_name); d_printf("Creation time \"%s\"\n", originInfo->creation_time); d_printf("Input device \"%s\"\n", originInfo->input_device); @@ -413,7 +413,7 @@ intern_dpxOpen(int mode, const char* bytestuff, int bufsize) { /* let's assume dpx files are always network order */ if (header.fileInfo.magic_num != ntohl(DPX_FILE_MAGIC)) { if (verbose) d_printf("Bad magic number %8.8lX in \"%s\".\n", - ntohl(header.fileInfo.magic_num), filename); + (unsigned long)ntohl(header.fileInfo.magic_num), filename); dpxClose(dpx); return 0; } diff --git a/source/blender/python/api2_2x/Curve.c b/source/blender/python/api2_2x/Curve.c index 50dc663d439..83435a1da7a 100644 --- a/source/blender/python/api2_2x/Curve.c +++ b/source/blender/python/api2_2x/Curve.c @@ -1306,7 +1306,6 @@ static PyGetSetDef Curve_getseters[] = { /*****************************************************************************/ static PyObject *M_Curve_New( PyObject * self, PyObject * args ) { - char buf[24]; char *name = "Curve"; BPy_Curve *pycurve; /* for Curve Data object wrapper in Python */ Curve *blcurve = 0; /* for actual Curve Data we create in Blender */ diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 9f73a9674b0..60fd064d873 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -511,7 +511,7 @@ static void count_object(Object *ob, int sel, int totob) Mesh *me; Curve *cu; DerivedMesh *dm; - int tot=0, totf=0, subsurf; + int tot=0, totf=0; switch(ob->type) { case OB_MESH: |