mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Formatting; remove 'loop has empty body' warnings with clang.
I have to admit, I like its grumbling. git-svn-id: https://svn.eduke32.com/eduke32@2416 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cd8836227f
commit
d4577fccb5
3 changed files with 37 additions and 9 deletions
|
@ -303,18 +303,26 @@ int32_t addsearchpath(const char *p)
|
||||||
if (!srch) return -1;
|
if (!srch) return -1;
|
||||||
|
|
||||||
srch->next = searchpathhead;
|
srch->next = searchpathhead;
|
||||||
srch->pathlen = strlen(p)+1;
|
srch->pathlen = Bstrlen(p)+1;
|
||||||
srch->path = (char *)Bmalloc(srch->pathlen + 1);
|
srch->path = (char *)Bmalloc(srch->pathlen + 1);
|
||||||
if (!srch->path)
|
if (!srch->path)
|
||||||
{
|
{
|
||||||
Bfree(srch);
|
Bfree(srch);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
strcpy(srch->path, p);
|
|
||||||
for (s=srch->path; *s; s++) ; s--; if (s<srch->path || toupperlookup[*s] != '/') strcat(srch->path, "/");
|
Bstrcpy(srch->path, p);
|
||||||
|
for (s=srch->path; *s; s++)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
s--;
|
||||||
|
if (s<srch->path || toupperlookup[*s] != '/')
|
||||||
|
Bstrcat(srch->path, "/");
|
||||||
|
|
||||||
searchpathhead = srch;
|
searchpathhead = srch;
|
||||||
if (srch->pathlen > maxsearchpathlen) maxsearchpathlen = srch->pathlen;
|
if (srch->pathlen > maxsearchpathlen)
|
||||||
|
maxsearchpathlen = srch->pathlen;
|
||||||
|
|
||||||
Bcorrectfilename(srch->path,0);
|
Bcorrectfilename(srch->path,0);
|
||||||
|
|
||||||
|
@ -1061,7 +1069,11 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int32_t type)
|
||||||
|
|
||||||
// scan for the end of the string and shift
|
// scan for the end of the string and shift
|
||||||
// everything left a char in the process
|
// everything left a char in the process
|
||||||
for (i=1; (buf[i-1]=buf[i]); i++) ; i-=2;
|
for (i=1; (buf[i-1]=buf[i]); i++)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
i-=2;
|
||||||
|
|
||||||
// if there's a slash at the end, this is a directory entry
|
// if there's a slash at the end, this is a directory entry
|
||||||
if (toupperlookup[buf[i]] == '/') { ftype = CACHE1D_FIND_DIR; buf[i] = 0; }
|
if (toupperlookup[buf[i]] == '/') { ftype = CACHE1D_FIND_DIR; buf[i] = 0; }
|
||||||
|
|
|
@ -3021,7 +3021,11 @@ static int32_t loadkvx(const char *filnam)
|
||||||
vbit = (int32_t *)Bmalloc(i); if (!vbit) { Bfree(xyoffs); kclose(fil); return(-1); }
|
vbit = (int32_t *)Bmalloc(i); if (!vbit) { Bfree(xyoffs); kclose(fil); return(-1); }
|
||||||
memset(vbit,0,i);
|
memset(vbit,0,i);
|
||||||
|
|
||||||
for (vcolhashsizm1=4096; vcolhashsizm1<(mip1leng>>1); vcolhashsizm1<<=1); vcolhashsizm1--; //approx to numvoxs!
|
for (vcolhashsizm1=4096; vcolhashsizm1<(mip1leng>>1); vcolhashsizm1<<=1)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
vcolhashsizm1--; //approx to numvoxs!
|
||||||
vcolhashead = (int32_t *)Bmalloc((vcolhashsizm1+1)*sizeof(int32_t)); if (!vcolhashead) { Bfree(xyoffs); kclose(fil); return(-1); }
|
vcolhashead = (int32_t *)Bmalloc((vcolhashsizm1+1)*sizeof(int32_t)); if (!vcolhashead) { Bfree(xyoffs); kclose(fil); return(-1); }
|
||||||
memset(vcolhashead,-1,(vcolhashsizm1+1)*sizeof(int32_t));
|
memset(vcolhashead,-1,(vcolhashsizm1+1)*sizeof(int32_t));
|
||||||
|
|
||||||
|
@ -3077,7 +3081,11 @@ static int32_t loadkv6(const char *filnam)
|
||||||
vbit = (int32_t *)Bmalloc(i); if (!vbit) { Bfree(ylen); kclose(fil); return(-1); }
|
vbit = (int32_t *)Bmalloc(i); if (!vbit) { Bfree(ylen); kclose(fil); return(-1); }
|
||||||
memset(vbit,0,i);
|
memset(vbit,0,i);
|
||||||
|
|
||||||
for (vcolhashsizm1=4096; vcolhashsizm1<numvoxs; vcolhashsizm1<<=1); vcolhashsizm1--;
|
for (vcolhashsizm1=4096; vcolhashsizm1<numvoxs; vcolhashsizm1<<=1)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
vcolhashsizm1--;
|
||||||
vcolhashead = (int32_t *)Bmalloc((vcolhashsizm1+1)*sizeof(int32_t)); if (!vcolhashead) { Bfree(ylen); kclose(fil); return(-1); }
|
vcolhashead = (int32_t *)Bmalloc((vcolhashsizm1+1)*sizeof(int32_t)); if (!vcolhashead) { Bfree(ylen); kclose(fil); return(-1); }
|
||||||
memset(vcolhashead,-1,(vcolhashsizm1+1)*sizeof(int32_t));
|
memset(vcolhashead,-1,(vcolhashsizm1+1)*sizeof(int32_t));
|
||||||
|
|
||||||
|
|
|
@ -2221,8 +2221,16 @@ void drawpoly(double *dpx, double *dpy, int32_t n, int32_t method)
|
||||||
|
|
||||||
if (!glinfo.texnpot)
|
if (!glinfo.texnpot)
|
||||||
{
|
{
|
||||||
for (xx=1; xx<tsizx; xx+=xx); ox2 = (double)1.0/(double)xx;
|
for (xx=1; xx<tsizx; xx+=xx)
|
||||||
for (yy=1; yy<tsizy; yy+=yy); oy2 = (double)1.0/(double)yy;
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
ox2 = (double)1.0/(double)xx;
|
||||||
|
for (yy=1; yy<tsizy; yy+=yy)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
oy2 = (double)1.0/(double)yy;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue