sqc 0.4.13

Software Code Quality - CERT C compliance checker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Rule: FLP03-C
 * Source: testcases
 * Status: PASS - Cast to float/double without division should not flag.
 *         v0.3.44 removed overbroad check_fp_conversion().
 */

float int_to_float(int x) {
    return (float)x;
}

double int_to_double(int x) {
    return (double)x;
}

double float_to_double(float f) {
    return (double)f;
}