mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
SW: Fix warning: passing argument 1 of 'allocache' from incompatible pointer type [enabled by default] and warning: pointer targets in passing argument 3 of 'allocache' differ in signedness [-Wpointer-sign]
git-svn-id: https://svn.eduke32.com/eduke32@5222 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
809b1e6f65
commit
59686129bb
4 changed files with 3 additions and 36 deletions
|
@ -2696,7 +2696,7 @@ ScreenLoadSaveSetup(PLAYERp pp)
|
|||
ScreenTileLock();
|
||||
|
||||
if (!waloff[SAVE_SCREEN_TILE])
|
||||
allocache((void **)&waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, &walock[SAVE_SCREEN_TILE]);
|
||||
allocache((intptr_t*)&waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, &walock[SAVE_SCREEN_TILE]);
|
||||
|
||||
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_XSIZE;
|
||||
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_YSIZE;
|
||||
|
|
|
@ -377,39 +377,6 @@ int krand1(void)
|
|||
|
||||
#endif
|
||||
|
||||
void *
|
||||
CacheAlloc(void **ptr, int size, unsigned char *lock_byte)
|
||||
{
|
||||
if (*ptr == NULL)
|
||||
{
|
||||
*lock_byte = CACHE_LOCK_START;
|
||||
allocache(ptr, size, lock_byte);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*lock_byte < CACHE_LOCK_START)
|
||||
*lock_byte = CACHE_LOCK_START;
|
||||
else
|
||||
(*lock_byte)++;
|
||||
}
|
||||
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
void
|
||||
CacheFree(void **ptr, unsigned char *lock_byte)
|
||||
{
|
||||
if (*ptr == NULL)
|
||||
{
|
||||
ASSERT(*lock_byte == NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*lock_byte < CACHE_LOCK_START)
|
||||
*lock_byte = CACHE_UNLOCK_START;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void HeapCheck(char *file, int line)
|
||||
{
|
||||
|
|
|
@ -778,7 +778,7 @@ SWBOOL CacheSound(int num, int type)
|
|||
*/
|
||||
vp->lock = CACHE_UNLOCK_MAX;
|
||||
|
||||
allocache((void **)&vp->data, length, &vp->lock);
|
||||
allocache((intptr_t*)&vp->data, length, &vp->lock);
|
||||
|
||||
#if 0
|
||||
// DEBUG
|
||||
|
|
|
@ -145,7 +145,7 @@ struct VOCstruct
|
|||
int16_t voc_num; // Backward reference to parent sound
|
||||
int voc_distance; // Sound's distance effectiveness
|
||||
Voc_Flags voc_flags; // Various allowable flag settings for voc
|
||||
uint8_t lock; // locking byte for caching
|
||||
char lock; // locking byte for caching
|
||||
uint8_t playing; // number of this type of sound currently playing
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue