Commit 66b4971f authored by Richard Gobeille's avatar Richard Gobeille

engine: fix compiler warnings

parent a091a89d
......@@ -252,7 +252,7 @@ void uninitgroupfile(void);
buildvfs_kfd kopen4load(const char *filename, char searchfirst); // searchfirst: 0 = anywhere, 1 = first group, 2 = any group
buildvfs_kfd kopen4loadfrommod(const char* filename, char searchfirst);
int32_t kread(buildvfs_kfd handle, void *buffer, int32_t leng);
#define kread_and_test(handle, buffer, leng) EDUKE32_PREDICT_FALSE(kread((handle), (buffer), (leng)) != (leng))
#define kread_and_test(handle, buffer, leng) EDUKE32_PREDICT_FALSE(kread((handle), (buffer), (leng)) != (int32_t)(leng))
int32_t klseek(buildvfs_kfd handle, int32_t offset, int32_t whence);
#define klseek_and_test(handle, offset, whence) EDUKE32_PREDICT_FALSE(klseek((handle), (offset), (whence)) < 0)
int32_t kfilelength(buildvfs_kfd handle);
......
......@@ -5747,13 +5747,13 @@ draw_as_face_sprite:
rzi[2] = rzi[1]+dax; rxi[2] = rxi[1]+day;
rzi[3] = rzi[0]+dax; rxi[3] = rxi[0]+day;
float sgzd, sgzx, sgz, sdaz;
float sgzd = 0, sgzx = 0, sgz = 0, sdaz = 0;
vec2f_t sg_f = {}, sg_f2 = {};
vec2_t sg1 = {};
if (slope != 0)
{
int daz;
int daz = 0;
float const fslope = (float)slope;
float const fsinang = (float)sinang;
float const fcosang = (float)cosang;
......@@ -9990,11 +9990,16 @@ static int enginePrepareLoadBoard(buildvfs_kfd fil, vec3_t *dapos, int16_t *daan
if (!have_maptext())
{
if (kread_and_test(fil, &dapos->x, 4)) return -1; dapos->x = B_LITTLE32(dapos->x);
if (kread_and_test(fil, &dapos->y, 4)) return -1; dapos->y = B_LITTLE32(dapos->y);
if (kread_and_test(fil, &dapos->z, 4)) return -1; dapos->z = B_LITTLE32(dapos->z);
if (kread_and_test(fil, daang, 2)) return -1; *daang = B_LITTLE16(*daang) & 2047;
if (kread_and_test(fil, dacursectnum, 2)) return -1; *dacursectnum = B_LITTLE16(*dacursectnum);
if (kread_and_test(fil, &dapos->x, 4)) return -1;
dapos->x = B_LITTLE32(dapos->x);
if (kread_and_test(fil, &dapos->y, 4)) return -1;
dapos->y = B_LITTLE32(dapos->y);
if (kread_and_test(fil, &dapos->z, 4)) return -1;
dapos->z = B_LITTLE32(dapos->z);
if (kread_and_test(fil, daang, 2)) return -1;
*daang = B_LITTLE16(*daang) & 2047;
if (kread_and_test(fil, dacursectnum, 2)) return -1;
*dacursectnum = B_LITTLE16(*dacursectnum);
}
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment