+ fix flaws found with code analyzer tool
This commit is contained in:
@@ -123,6 +123,8 @@ DocumentObjectExecReturn *FeatureTest::execute(void)
|
||||
float f;
|
||||
void *s;
|
||||
|
||||
// Code analyzers may complain about some errors. This can be ignored
|
||||
// because this is done on purpose to test the error handling mechanism
|
||||
switch(ExceptionType.getValue())
|
||||
{
|
||||
case 0: break;
|
||||
@@ -131,7 +133,7 @@ DocumentObjectExecReturn *FeatureTest::execute(void)
|
||||
case 3: *i=0;printf("%i",*i);break; // seg-vault
|
||||
case 4: j=0; printf("%i",1/j); break; // int devision by zero
|
||||
case 5: f=0.0; printf("%f",1/f); break; // float devision by zero
|
||||
case 6: s = malloc(3600000000ul);break; // out-of-memory
|
||||
case 6: s = malloc(3600000000ul); free(s); break; // out-of-memory
|
||||
}
|
||||
|
||||
ExecCount.setValue(ExecCount.getValue() + 1);
|
||||
|
||||
Reference in New Issue
Block a user