From f3f565db6c16cf15f9e99027161cd38fd749ae39 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 20 Jun 2020 17:19:38 -0700 Subject: rmd_cache: silence compiler warnings about gzFile zlib typedefs gzFile to already be a pointer to the struct, so these shouldn't have two pointers on the fp, one comes with the type. --- recordmydesktop/src/rmd_cache.c | 4 ++-- recordmydesktop/src/rmd_cache.h | 4 ++-- recordmydesktop/src/rmd_cache_frame.c | 4 ++-- recordmydesktop/src/rmd_load_cache.c | 6 +++--- recordmydesktop/src/rmd_types.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/recordmydesktop/src/rmd_cache.c b/recordmydesktop/src/rmd_cache.c index 22c7200..bb3c765 100644 --- a/recordmydesktop/src/rmd_cache.c +++ b/recordmydesktop/src/rmd_cache.c @@ -57,7 +57,7 @@ static void rmdCacheFileN(char *name, char **newname, int n) { // Nth cache file strcat(*newname, numbuf); } -int rmdSwapCacheFilesWrite(char *name, int n, gzFile **fp, FILE **ucfp) { +int rmdSwapCacheFilesWrite(char *name, int n, gzFile *fp, FILE **ucfp) { char *newname = malloc(strlen(name) + 10); rmdCacheFileN(name, &newname, n); @@ -75,7 +75,7 @@ int rmdSwapCacheFilesWrite(char *name, int n, gzFile **fp, FILE **ucfp) { return ((*fp == NULL) && (*ucfp == NULL)); } -int rmdSwapCacheFilesRead(char *name, int n, gzFile **fp, FILE **ucfp) { +int rmdSwapCacheFilesRead(char *name, int n, gzFile *fp, FILE **ucfp) { char *newname = malloc(strlen(name) + 10); rmdCacheFileN(name, &newname, n); diff --git a/recordmydesktop/src/rmd_cache.h b/recordmydesktop/src/rmd_cache.h index 2def0e3..9f4acce 100644 --- a/recordmydesktop/src/rmd_cache.h +++ b/recordmydesktop/src/rmd_cache.h @@ -49,7 +49,7 @@ * * \returns 0 on Success 1 on Failure */ -int rmdSwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp); +int rmdSwapCacheFilesWrite(char *name,int n,gzFile *fp,FILE **ucfp); /** * Change file pointer to a new file while reading @@ -65,7 +65,7 @@ int rmdSwapCacheFilesWrite(char *name,int n,gzFile **fp,FILE **ucfp); * * \returns 0 on Success 1 on Failure */ -int rmdSwapCacheFilesRead(char *name,int n,gzFile **fp,FILE **ucfp); +int rmdSwapCacheFilesRead(char *name,int n,gzFile *fp,FILE **ucfp); /** * Delete all cache files diff --git a/recordmydesktop/src/rmd_cache_frame.c b/recordmydesktop/src/rmd_cache_frame.c index 0747f7d..8173080 100644 --- a/recordmydesktop/src/rmd_cache_frame.c +++ b/recordmydesktop/src/rmd_cache_frame.c @@ -50,7 +50,7 @@ static int rmdFlushBlock( int width, int height, int blockwidth, - gzFile *fp, + gzFile fp, FILE *ucfp, int flush) { @@ -89,7 +89,7 @@ static int rmdFlushBlock( void *rmdCacheImageBuffer(ProgData *pdata) { - gzFile *fp=NULL; + gzFile fp=NULL; FILE *ucfp=NULL; int index_entry_size=sizeof(u_int32_t), blocknum_x=pdata->enc_data->yuv.y_width/Y_UNIT_WIDTH, diff --git a/recordmydesktop/src/rmd_load_cache.c b/recordmydesktop/src/rmd_load_cache.c index 089121c..611195a 100644 --- a/recordmydesktop/src/rmd_load_cache.c +++ b/recordmydesktop/src/rmd_load_cache.c @@ -83,7 +83,7 @@ static void rmdLoadBlock(unsigned char *dest, } //returns number of bytes -static int rmdReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFile *ifp) { +static int rmdReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFile ifp) { if ((ifp!=NULL && ucfp!=NULL)|| (ifp==NULL && ucfp==NULL)) return -1; @@ -93,7 +93,7 @@ static int rmdReadZF(void * buffer, size_t size, size_t nmemb, FILE *ucfp, gzFil return gzread(ifp,buffer,size*nmemb); } -static int rmdReadFrame(CachedFrame *frame, FILE *ucfp, gzFile *ifp) { +static int rmdReadFrame(CachedFrame *frame, FILE *ucfp, gzFile ifp) { int index_entry_size=sizeof(u_int32_t); if (frame->header->Ynum>0) { @@ -162,7 +162,7 @@ static int rmdReadFrame(CachedFrame *frame, FILE *ucfp, gzFile *ifp) { void *rmdLoadCache(ProgData *pdata) { yuv_buffer *yuv=&pdata->enc_data->yuv; - gzFile *ifp=NULL; + gzFile ifp=NULL; FILE *ucfp=NULL; FILE *afp=pdata->cache_data->afp; FrameHeader fheader; diff --git a/recordmydesktop/src/rmd_types.h b/recordmydesktop/src/rmd_types.h index d80f835..b655d18 100644 --- a/recordmydesktop/src/rmd_types.h +++ b/recordmydesktop/src/rmd_types.h @@ -201,7 +201,7 @@ typedef struct _CacheData{ *imgdata, //workdir+projname+img.out.gz *audiodata; //workdir+projname+audio.pcm - gzFile *ifp; //image data file pointer + gzFile ifp; //image data file pointer FILE *uncifp; //uncompressed image data file pointer FILE *afp; //audio data file pointer -- cgit v1.2.1