Riccardom warnings fixes patches:
- cflash.cpp: this was straightforward, i've moved p declaration only because there it's easier to follow where it is used. - GPU.cpp: that functions is very long and has an horrible formatting, please review. - MMU.cpp: return in case of default inside a switch is used often inside the code so i've done the same.
This commit is contained in:
parent
76944b5625
commit
40880f8be1
|
@ -2140,10 +2140,15 @@ else
|
|||
case 2:
|
||||
capx = 256;
|
||||
capy = 128;
|
||||
break;
|
||||
case 3:
|
||||
capx = 256;
|
||||
capy = 192;
|
||||
break;
|
||||
default:
|
||||
capx = 0;
|
||||
capy = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(l < capy) /* check if our line is in cature area */
|
||||
|
|
|
@ -3095,6 +3095,8 @@ void FASTCALL MMU_doDMA(u32 proc, u32 num)
|
|||
case 1 : dstinc = -sz; break;
|
||||
case 2 : dstinc = 0; break;
|
||||
case 3 : dstinc = sz; break; //reload
|
||||
default:
|
||||
return;
|
||||
}
|
||||
switch((u >> 2)&0x3) {
|
||||
case 0 : srcinc = sz; break;
|
||||
|
@ -3102,6 +3104,8 @@ void FASTCALL MMU_doDMA(u32 proc, u32 num)
|
|||
case 2 : srcinc = 0; break;
|
||||
case 3 : // reserved
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if ((MMU.DMACrt[proc][num]>>26)&1)
|
||||
for(; i < taille; ++i)
|
||||
|
|
|
@ -152,7 +152,6 @@ static const int lfnPos[13] = {1,3,5,7,9,14,16,18,20,22,24,28,30};
|
|||
static void add_file(char *fname, FsEntry * entry, int fileLevel) {
|
||||
int i,j,k,n;
|
||||
u8 chk;
|
||||
char *p;
|
||||
|
||||
if (numFiles < MAXFILES-1) {
|
||||
if (strcmp(fname,"..") != 0) {
|
||||
|
@ -175,6 +174,8 @@ static void add_file(char *fname, FsEntry * entry, int fileLevel) {
|
|||
|
||||
// See if LFN entries need to be added
|
||||
if (strlen(entry->cAlternateFileName)>0) {
|
||||
char *p = NULL;
|
||||
|
||||
chk = lfn_checksum();
|
||||
k = (strlen(entry->cFileName)/13) + (((strlen(entry->cFileName)%13)!=0)?1:0);
|
||||
numFiles += k;
|
||||
|
@ -201,7 +202,8 @@ static void add_file(char *fname, FsEntry * entry, int fileLevel) {
|
|||
*(p + lfnPos[j]) = entry->cFileName[i];
|
||||
*(p + lfnPos[j]+1) = 0;
|
||||
}
|
||||
p[0] |= 0x40; // END
|
||||
if (p != NULL)
|
||||
p[0] |= 0x40; // END
|
||||
for (i=strlen(fname)-1; i>=0; i--)
|
||||
if (fname[i]=='.') break;
|
||||
if ((i==0)&&(strcmp(fname,".")==0)) i = 1;
|
||||
|
|
Loading…
Reference in New Issue