Remove gcc compiler warnings from various files.

This commit is contained in:
Ken Hughes
2007-03-11 17:31:27 +00:00
parent e0c77c0f14
commit d60b05254d
6 changed files with 17 additions and 20 deletions

View File

@@ -67,12 +67,12 @@ fillCineonFileInfo(CineonFile* cineon, CineonFileInformation* fileInfo, const ch
static void static void
dumpCineonFileInfo(CineonFileInformation* fileInfo) { dumpCineonFileInfo(CineonFileInformation* fileInfo) {
d_printf("\n--File Information--\n"); d_printf("\n--File Information--\n");
d_printf("Magic: %8.8lX\n", ntohl(fileInfo->magic_num)); d_printf("Magic: %8.8lX\n", (unsigned long)ntohl(fileInfo->magic_num));
d_printf("Image Offset %ld\n", ntohl(fileInfo->image_offset)); d_printf("Image Offset %ld\n", (long)ntohl(fileInfo->image_offset));
d_printf("Generic Header size %ld\n", ntohl(fileInfo->gen_hdr_size)); d_printf("Generic Header size %ld\n", (long)ntohl(fileInfo->gen_hdr_size));
d_printf("Industry Header size %ld\n", ntohl(fileInfo->ind_hdr_size)); d_printf("Industry Header size %ld\n", (long)ntohl(fileInfo->ind_hdr_size));
d_printf("User Data size %ld\n", ntohl(fileInfo->user_data_size)); d_printf("User Data size %ld\n", (long)ntohl(fileInfo->user_data_size));
d_printf("File size %ld\n", ntohl(fileInfo->file_size)); d_printf("File size %ld\n", (long)ntohl(fileInfo->file_size));
d_printf("Version \"%s\"\n", fileInfo->vers); d_printf("Version \"%s\"\n", fileInfo->vers);
d_printf("File name \"%s\"\n", fileInfo->file_name); d_printf("File name \"%s\"\n", fileInfo->file_name);
d_printf("Creation date \"%s\"\n", fileInfo->create_date); d_printf("Creation date \"%s\"\n", fileInfo->create_date);
@@ -112,11 +112,11 @@ dumpCineonChannelInfo(CineonChannelInformation* chan) {
default: d_printf(" (unknown)\n"); break; default: d_printf(" (unknown)\n"); break;
} }
d_printf(" Bits per pixel %d\n", chan->bits_per_pixel); d_printf(" Bits per pixel %d\n", chan->bits_per_pixel);
d_printf(" Pixels per line %ld\n", ntohl(chan->pixels_per_line)); d_printf(" Pixels per line %ld\n", (long)ntohl(chan->pixels_per_line));
d_printf(" Lines per image %ld\n", ntohl(chan->lines_per_image)); d_printf(" Lines per image %ld\n", (long)ntohl(chan->lines_per_image));
d_printf(" Ref low data %ld\n", ntohl(chan->ref_low_data)); 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 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(" Ref high quantity %f\n", ntohf(chan->ref_high_quantity));
} }
@@ -231,8 +231,8 @@ dumpCineonFormatInfo(CineonFormatInformation* formatInfo) {
} else { } else {
d_printf(" positive\n"); d_printf(" positive\n");
} }
d_printf("End of line padding %ld\n", ntohl(formatInfo->line_padding)); d_printf("End of line padding %ld\n", (long)ntohl(formatInfo->line_padding));
d_printf("End of channel padding %ld\n", ntohl(formatInfo->channel_padding)); d_printf("End of channel padding %ld\n", (long)ntohl(formatInfo->channel_padding));
} }
static void static void
@@ -256,8 +256,8 @@ fillCineonOriginationInfo(CineonFile* cineon,
static void static void
dumpCineonOriginationInfo(CineonOriginationInformation* originInfo) { dumpCineonOriginationInfo(CineonOriginationInformation* originInfo) {
d_printf("\n--Origination Information--\n"); d_printf("\n--Origination Information--\n");
d_printf("X offset %ld\n", ntohl(originInfo->x_offset)); d_printf("X offset %ld\n", (long)ntohl(originInfo->x_offset));
d_printf("Y offset %ld\n", ntohl(originInfo->y_offset)); d_printf("Y offset %ld\n", (long)ntohl(originInfo->y_offset));
d_printf("File name \"%s\"\n", originInfo->file_name); d_printf("File name \"%s\"\n", originInfo->file_name);
d_printf("Creation date \"%s\"\n", originInfo->create_date); d_printf("Creation date \"%s\"\n", originInfo->create_date);
d_printf("Creation time \"%s\"\n", originInfo->create_time); d_printf("Creation time \"%s\"\n", originInfo->create_time);
@@ -525,7 +525,7 @@ cineonOpen(const char* filename) {
/* let's assume cineon files are always network order */ /* let's assume cineon files are always network order */
if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) { if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) {
if (verbose) d_printf("Bad magic number %8.8lX in \"%s\".\n", 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);
cineonClose(cineon); cineonClose(cineon);
return 0; return 0;
} }
@@ -624,7 +624,7 @@ cineonOpenFromMem(unsigned char *mem, unsigned int size) {
/* let's assume cineon files are always network order */ /* let's assume cineon files are always network order */
if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) { if (header.fileInfo.magic_num != ntohl(CINEON_FILE_MAGIC)) {
if (verbose) d_printf("Bad magic number %8.8lX in\n", ntohl(header.fileInfo.magic_num)); if (verbose) d_printf("Bad magic number %8.8lX in\n", (unsigned long)ntohl(header.fileInfo.magic_num));
cineonClose(cineon); cineonClose(cineon);
return 0; return 0;

View File

@@ -213,7 +213,6 @@ static PyObject *M_Camera_New( PyObject * self, PyObject * args,
static char *kwlist[] = { "type_str", "name_str", NULL }; static char *kwlist[] = { "type_str", "name_str", NULL };
PyObject *pycam; /* for Camera Data object wrapper in Python */ PyObject *pycam; /* for Camera Data object wrapper in Python */
Camera *blcam; /* for actual Camera Data we create in Blender */ Camera *blcam; /* for actual Camera Data we create in Blender */
char buf[21];
/* Parse the arguments passed in by the Python interpreter */ /* Parse the arguments passed in by the Python interpreter */
if( !PyArg_ParseTupleAndKeywords( args, kwords, "|ss", kwlist, if( !PyArg_ParseTupleAndKeywords( args, kwords, "|ss", kwlist,

View File

@@ -352,7 +352,6 @@ PyTypeObject Group_Type = {
PyObject *M_Group_New( PyObject * self, PyObject * args ) PyObject *M_Group_New( PyObject * self, PyObject * args )
{ {
char *name = "Group"; char *name = "Group";
char buf[21];
BPy_Group *py_group; /* for Group Data object wrapper in Python */ BPy_Group *py_group; /* for Group Data object wrapper in Python */
struct Group *bl_group; struct Group *bl_group;

View File

@@ -7857,7 +7857,6 @@ static PyObject *M_Mesh_New( PyObject * self_unused, PyObject * args )
char *name = "Mesh"; char *name = "Mesh";
Mesh *mesh; Mesh *mesh;
BPy_Mesh *obj; BPy_Mesh *obj;
char buf[21];
if( !PyArg_ParseTuple( args, "|s", &name ) ) if( !PyArg_ParseTuple( args, "|s", &name ) )
return EXPP_ReturnPyObjError( PyExc_TypeError, return EXPP_ReturnPyObjError( PyExc_TypeError,

View File

@@ -77,6 +77,7 @@
#include "IDProp.h" #include "IDProp.h"
#include "constant.h" #include "constant.h"
#include "gen_utils.h" #include "gen_utils.h"
#include "gen_library.h"
extern void countall(void); extern void countall(void);

View File

@@ -144,7 +144,6 @@ static PyObject *Text_repr( BPy_Text * self );
static PyObject *M_Text_New( PyObject * self, PyObject * args) static PyObject *M_Text_New( PyObject * self, PyObject * args)
{ {
char *name = "Text"; char *name = "Text";
char buf[21];
int follow = 0; int follow = 0;
Text *bl_text; /* blender text object */ Text *bl_text; /* blender text object */
PyObject *py_text; /* python wrapper */ PyObject *py_text; /* python wrapper */