Skip to content

Commit ec01e9f

Browse files
author
mielvds
authored
Merge pull request #182 from rdfhdt/missing-break
FIXED: Missing breaks in switch statement.
2 parents 33cea21 + 461745b commit ec01e9f

1 file changed

Lines changed: 44 additions & 15 deletions

File tree

libcds/src/static/textindex/suftest3.test.cpp

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -379,21 +379,50 @@ namespace cds_static
379379
char * error_index(int e) {
380380
char *error = new char[50];
381381
switch(e) {
382-
case 0: printf(error, "No error"); break;
383-
case 1: printf(error, "Out of memory"); break;
384-
case 2: printf(error, "The text must end with a \\0"); break;
385-
case 5: printf(error, "You can't free the text if you don't copy it"); break;
386-
case 20: printf(error, "Cannot create files"); break;
387-
case 21: printf(error, "Error writing the index"); break;
388-
case 22: printf(error, "Error writing the index"); break;
389-
case 23: printf(error, "Cannot open index; break");
390-
case 24: printf(error, "Cannot open text; break");
391-
case 25: printf(error, "Error reading the index"); break;
392-
case 26: printf(error, "Error reading the index"); break;
393-
case 27: printf(error, "Error reading the text"); break;
394-
case 28: printf(error, "Error reading the text"); break;
395-
case 99: printf(error, "Not implemented"); break;
396-
default: printf(error, "Unknown error");
382+
case 0:
383+
printf(error, "No error");
384+
break;
385+
case 1:
386+
printf(error, "Out of memory");
387+
break;
388+
case 2:
389+
printf(error, "The text must end with a \\0");
390+
break;
391+
case 5:
392+
printf(error, "You can't free the text if you don't copy it");
393+
break;
394+
case 20:
395+
printf(error, "Cannot create files");
396+
break;
397+
case 21:
398+
printf(error, "Error writing the index");
399+
break;
400+
case 22:
401+
printf(error, "Error writing the index");
402+
break;
403+
case 23:
404+
printf(error, "Cannot open index");
405+
break;
406+
case 24:
407+
printf(error, "Cannot open text");
408+
break;
409+
case 25:
410+
printf(error, "Error reading the index");
411+
break;
412+
case 26:
413+
printf(error, "Error reading the index");
414+
break;
415+
case 27:
416+
printf(error, "Error reading the text");
417+
break;
418+
case 28:
419+
printf(error, "Error reading the text");
420+
break;
421+
case 99:
422+
printf(error, "Not implemented");
423+
break;
424+
default:
425+
printf(error, "Unknown error");
397426
}
398427
return error;
399428
}

0 commit comments

Comments
 (0)