a few more warning squelches

This commit is contained in:
David Rose 2009-02-19 00:23:08 +00:00
parent 9b952e3922
commit 923c9929a1
10 changed files with 14 additions and 14 deletions

View File

@ -1202,7 +1202,7 @@ read_tar(TarDef &tar, istream &stream) {
stream.seekg(0, ios::beg);
nassertr(_tar_istream == NULL, false);
_tar_istream = &stream;
if (tar_open(&tfile, "dummy", &tt, O_RDONLY, 0, 0) != 0) {
if (tar_open(&tfile, (char *)"dummy", &tt, O_RDONLY, 0, 0) != 0) {
_tar_istream = NULL;
return false;
}

View File

@ -90,7 +90,7 @@ open_read(istream *source, bool owns_source) {
_z_source.zfree = (free_func)&do_zlib_free;
#endif
_z_source.opaque = Z_NULL;
_z_source.msg = "no error message";
_z_source.msg = (char *)"no error message";
int result = inflateInit(&_z_source);
if (result < 0) {
@ -141,7 +141,7 @@ open_write(ostream *dest, bool owns_dest, int compression_level) {
_z_dest.zfree = (free_func)&do_zlib_free;
#endif
_z_dest.opaque = Z_NULL;
_z_dest.msg = "no error message";
_z_dest.msg = (char *)"no error message";
int result = deflateInit(&_z_dest, compression_level);
if (result < 0) {

View File

@ -23,7 +23,7 @@
TypeHandle StencilAttrib::_type_handle;
int StencilAttrib::_attrib_slot;
char *StencilAttrib::
const char *StencilAttrib::
stencil_render_state_name_array [StencilAttrib::SRS_total] =
{
"SRS_front_enable",

View File

@ -153,7 +153,7 @@ PUBLISHED:
INLINE unsigned int get_render_state (unsigned int render_state_identifier) const;
public:
static char *stencil_render_state_name_array [SRS_total];
static const char *stencil_render_state_name_array [SRS_total];
virtual void output(ostream &out) const;

View File

@ -46,7 +46,7 @@ struct bitstream
*/
EXPCL_PANDA_PNMIMAGE struct bitstream *
pm_bitinit(istream *f, char *mode)
pm_bitinit(istream *f, const char *mode)
{
struct bitstream *ans = (struct bitstream *)0;
@ -66,7 +66,7 @@ pm_bitinit(istream *f, char *mode)
}
EXPCL_PANDA_PNMIMAGE struct bitstream *
pm_bitinit(ostream *f, char *mode)
pm_bitinit(ostream *f, const char *mode)
{
struct bitstream *ans = (struct bitstream *)0;

View File

@ -30,8 +30,8 @@ typedef struct bitstream *BITSTREAM;
* Returns 0 on error.
*/
extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(istream *f, char *mode);
extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(ostream *f, char *mode);
extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(istream *f, const char *mode);
extern EXPCL_PANDA_PNMIMAGE BITSTREAM pm_bitinit(ostream *f, const char *mode);
/*
* pm_bitfini() - deallocate the given BITSTREAM.

View File

@ -55,7 +55,7 @@ static short get_byte_as_short (istream *f);
static int readerr (istream *f);
static void * xmalloc (int bytes);
#define MALLOC(n, type) (type *)xmalloc((n) * sizeof(type))
static char * compression_name (char compr);
static const char * compression_name (char compr);
static void read_bytes (istream *ifp, int n, char *buf);
static bool read_header(istream *ifp, Header *head, const string &magic_number);
static TabEntry * read_table (istream *ifp, int tablen);
@ -503,7 +503,7 @@ xmalloc(int bytes) {
return mem;
}
static char *
static const char *
compression_name(char compr) {
switch( compr ) {
case STORAGE_VERBATIM:

View File

@ -1,7 +1,7 @@
#include <stdarg.h>
#include "zgl.h"
void gl_fatal_error(char *format, ...)
void gl_fatal_error(const char *format, ...)
{
va_list ap;

View File

@ -916,7 +916,7 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
XClassHint *class_hints_p = NULL;
if (properties.get_undecorated()) {
class_hints_p = XAllocClassHint();
class_hints_p->res_class = "Undecorated";
class_hints_p->res_class = (char *)"Undecorated";
if (!properties.get_fullscreen()) {
type_data[next_type_data++] = _net_wm_window_type_splash;

View File

@ -230,7 +230,7 @@ void gl_resizeImageNoInterpolate(unsigned char *dest,int xsize_dest,int ysize_de
GLContext *gl_get_context(void);
void gl_fatal_error(char *format, ...);
void gl_fatal_error(const char *format, ...);
/* specular buffer "api" */