Skip to content

Commit 1c11f2e

Browse files
JaySoni1kgrytestdlib-bot
authored
chore: address C lint errors
PR-URL: #6193 Closes: #6132 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]> Signed-off-by: Athan Reines <[email protected]> Co-authored-by: stdlib-bot <[email protected]>
1 parent 6aeed5c commit 1c11f2e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/node_modules/@stdlib/stats/base/smeanors/benchmark/c/benchmark.length.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ static double benchmark( int iterations, int len ) {
107107
v = 0.0f;
108108
t = tic();
109109
for ( i = 0; i < iterations; i++ ) {
110+
// cppcheck-suppress uninitvar
110111
v = stdlib_strided_smeanors( len, x, 1 );
111112
if ( v != v ) {
112113
printf( "should not return NaN\n" );

lib/node_modules/@stdlib/strided/base/dmskmap/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ static double scale( const double x ) {
2828

2929
int main( void ) {
3030
// Create an input strided array:
31-
double X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 };
31+
const double X[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 };
3232

3333
// Create a mask strided array:
34-
uint8_t M[] = { 0, 0, 1, 0, 0, 1 };
34+
const uint8_t M[] = { 0, 0, 1, 0, 0, 1 };
3535

3636
// Create an output strided array:
3737
double Y[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };

0 commit comments

Comments
 (0)