Mercurial > mplayer.hg
changeset 33710:fd498969e72d
Clean up some function prototypes.
Use const where possible and plain "char" instead of
"unsigned char" for filenames.
Fixes some clang compiler warnings.
author | reimar |
---|---|
date | Sat, 02 Jul 2011 23:12:45 +0000 |
parents | d7d180520491 |
children | bdddbf265c6e |
files | gui/util/bitmap.c gui/util/bitmap.h |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/util/bitmap.c Sat Jul 02 22:59:40 2011 +0000 +++ b/gui/util/bitmap.c Sat Jul 02 23:12:45 2011 +0000 @@ -30,7 +30,7 @@ #include "libvo/fastmemcpy.h" #include "mp_msg.h" -static int pngRead(unsigned char *fname, guiImage *bf) +static int pngRead(const char *fname, guiImage *bf) { FILE *file; long len; @@ -165,10 +165,10 @@ return 1; } -static unsigned char *fExist(unsigned char *fname) +static const char *fExist(const char *fname) { static const char ext[][4] = { "png", "PNG" }; - static unsigned char buf[512]; + static char buf[512]; unsigned int i; if (access(fname, R_OK) == 0) @@ -184,7 +184,7 @@ return NULL; } -int bpRead(char *fname, guiImage *bf) +int bpRead(const char *fname, guiImage *bf) { int r; @@ -217,7 +217,7 @@ memset(bf, 0, sizeof(*bf)); } -int bpRenderMask(guiImage *in, guiImage *out) +int bpRenderMask(const guiImage *in, guiImage *out) { uint32_t *buf; unsigned long i;
--- a/gui/util/bitmap.h Sat Jul 02 22:59:40 2011 +0000 +++ b/gui/util/bitmap.h Sat Jul 02 23:12:45 2011 +0000 @@ -34,7 +34,7 @@ } guiImage; void bpFree(guiImage *bf); -int bpRead(char *fname, guiImage *bf); -int bpRenderMask(guiImage *in, guiImage *out); +int bpRead(const char *fname, guiImage *bf); +int bpRenderMask(const guiImage *in, guiImage *out); #endif /* MPLAYER_GUI_BITMAP_H */