Skip to content

Commit eabfe70

Browse files
author
camilo
committed
sa fixes
1 parent 52295d4 commit eabfe70

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

qbitfield.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "qbitfield.h"
77
#include <string.h>
88

9-
static const size_t qBitField_LBit = (size_t)( sizeof(uint32_t) * 8u );
9+
static const size_t qBitField_LBit = (size_t)( sizeof(uint32_t) * 8U );
1010

1111
static uint32_t qBitField_Mask( const size_t index );
1212
static size_t qBitField_BitSlot( const size_t index );

qffmath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static float qFFMath_CalcCbrt( float x , bool r )
174174
}
175175
/*cppcheck-suppress misra-c2012-21.15 */
176176
cast_reinterpret( i, x, uint32_t );
177-
i = 0x548C2B4Bu - ( i/3U );
177+
i = 0x548C2B4BU - ( i/3U );
178178
/*cppcheck-suppress misra-c2012-21.15 */
179179
cast_reinterpret( y, i, float );
180180
c = x*y*y*y;

qfis.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static size_t qFIS_InferenceConsequent( struct _qFIS_s * const f,
547547

548548
outIndex = f->rules[ i ];
549549
MFOutIndex = f->rules[ i + 1U ];
550-
connector = ( f->nOutputs > 1U )? f->rules[ i + 2u ] : -1;
550+
connector = ( f->nOutputs > 1U )? f->rules[ i + 2U ] : -1;
551551
if ( MFOutIndex < 0 ) {
552552
MFOutIndex = -MFOutIndex;
553553
neg = 1U;
@@ -579,7 +579,7 @@ static size_t qFIS_InferenceConsequent( struct _qFIS_s * const f,
579579
}
580580
}
581581

582-
i += 2u;
582+
i += 2U;
583583
if ( _QFIS_AND != connector ) {
584584
f->aggregationState = &qFIS_AggregationFindConsequent;
585585
++f->ruleCount;

qfmathex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ bool qFMathEx_InPolygon( const float x,
7474
bool retVal = false;
7575
float max_y = py[ 0 ], max_x = px[ 0 ], min_y = py[ 0 ], min_x = px[ 0 ];
7676

77-
for ( i = 0u ; i < p ; ++i ) {
77+
for ( i = 0U ; i < p ; ++i ) {
7878
max_y = QLIB_MAX( py[ i ], max_y );
7979
max_x = QLIB_MAX( px[ i ], max_x );
8080
min_y = QLIB_MIN( py[ i ], min_y );

qfp16.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ static const struct _qFP16_intern_s intern = {
3434
/*f_16*/ 1048576,
3535
/*f_100*/ 6553600,
3636
/*f_6_5*/ 425984,
37-
/*one_fp16_f*/ 0.0000152587890625f,
37+
/*one_fp16_f*/ 0.0000152587890625F,
3838
/*one_fp16_d*/ 0.0000152587890625,
3939
/*overflow_mask*/ 0x80000000U,
40-
/*fraction_mask*/ 0x0000FFFFu,
40+
/*fraction_mask*/ 0x0000FFFFU,
4141
/*integer_mask*/ 0xFFFF0000U
4242
};
4343

@@ -150,7 +150,7 @@ qFP16_t qFP16_FloatToFP( const float x )
150150
retValue = x * (float)qFP16.one;
151151
/*cstat +CERT-FLP36-C*/
152152
if ( 1U == fp->rounding ) {
153-
retValue += ( retValue >= 0.0f) ? 0.5f : -0.5f;
153+
retValue += ( retValue >= 0.0F ) ? 0.5F : -0.5F;
154154
}
155155

156156
return (qFP16_t)retValue;
@@ -377,12 +377,12 @@ qFP16_t qFP16_Sqrt( qFP16_t x )
377377

378378
retValue = 0;
379379
/*cppcheck-suppress [ cert-INT31-c, misra-c2012-12.2, misra-c2012-12.1 ]*/
380-
bit = ( 0 != ( x & (qFP16_t)4293918720 ) ) ? ( 1U << 30U ) : ( 1U << 18u );
380+
bit = ( 0 != ( x & (qFP16_t)4293918720 ) ) ? ( 1U << 30U ) : ( 1U << 18U );
381381
while ( bit > (uint32_t)x ) {
382-
bit >>= 2u;
382+
bit >>= 2U;
383383
}
384384

385-
for ( n = 0U ; n < 2u ; ++n ) {
385+
for ( n = 0U ; n < 2U ; ++n ) {
386386
while ( 0U != bit ) {
387387
/*cppcheck-suppress misra-c2012-10.8 */
388388
if ( x >= (qFP16_t)( (uint32_t)retValue + bit ) ) {
@@ -395,7 +395,7 @@ qFP16_t qFP16_Sqrt( qFP16_t x )
395395
/*cppcheck-suppress misra-c2012-10.1 */
396396
retValue = ( retValue >> 1 );
397397
}
398-
bit >>= 2u;
398+
bit >>= 2U;
399399
}
400400

401401
if ( 0U == n ) {
@@ -892,8 +892,8 @@ qFP16_t qFP16_AToFP( const char *s )
892892
iPart += digit;
893893
++count;
894894
overflow = ( ( 0 == count ) || ( count > 5 ) ||
895-
( iPart > 32768u ) ||
896-
( ( 0U == neg ) && ( iPart > 32767u ) ) );
895+
( iPart > 32768U ) ||
896+
( ( 0U == neg ) && ( iPart > 32767U ) ) );
897897
}
898898
}
899899
else {

0 commit comments

Comments
 (0)