@@ -77,10 +77,10 @@ uint8_t * stdlib_ndarray_get_ptr( const struct ndarray *arr, const int64_t *sub
7777int8_t stdlib_ndarray_get_ptr_value ( const struct ndarray * arr , const uint8_t * idx , void * out ) {
7878 switch ( arr -> dtype ) {
7979 case STDLIB_NDARRAY_FLOAT64 :
80- * (double * )out = * (double * )idx ;
80+ * (double * )out = * (double * )idx ; // cppcheck-suppress invalidPointerCast
8181 return 0 ;
8282 case STDLIB_NDARRAY_FLOAT32 :
83- * (float * )out = * (float * )idx ;
83+ * (float * )out = * (float * )idx ; // cppcheck-suppress invalidPointerCast
8484 return 0 ;
8585 case STDLIB_NDARRAY_UINT64 :
8686 * (uint64_t * )out = * (uint64_t * )idx ;
@@ -110,10 +110,10 @@ int8_t stdlib_ndarray_get_ptr_value( const struct ndarray *arr, const uint8_t *i
110110 * (int8_t * )out = * (int8_t * )idx ;
111111 return 0 ;
112112 case STDLIB_NDARRAY_COMPLEX128 :
113- * (double complex * )out = * (double complex * )idx ;
113+ * (double complex * )out = * (double complex * )idx ; // cppcheck-suppress invalidPointerCast
114114 return 0 ;
115115 case STDLIB_NDARRAY_COMPLEX64 :
116- * (float complex * )out = * (float complex * )idx ;
116+ * (float complex * )out = * (float complex * )idx ; // cppcheck-suppress invalidPointerCast
117117 return 0 ;
118118 case STDLIB_NDARRAY_BOOL :
119119 * (bool * )out = * (bool * )idx ;
@@ -136,7 +136,7 @@ int8_t stdlib_ndarray_get_ptr_value( const struct ndarray *arr, const uint8_t *i
136136* @return status code
137137*/
138138int8_t stdlib_ndarray_get_ptr_float64 ( const uint8_t * idx , double * out ) {
139- * out = * (double * )idx ;
139+ * out = * (double * )idx ; // cppcheck-suppress invalidPointerCast
140140 return 0 ;
141141}
142142
@@ -153,7 +153,7 @@ int8_t stdlib_ndarray_get_ptr_float64( const uint8_t *idx, double *out ) {
153153* @return status code
154154*/
155155int8_t stdlib_ndarray_get_ptr_float32 ( const uint8_t * idx , float * out ) {
156- * out = * (float * )idx ;
156+ * out = * (float * )idx ; // cppcheck-suppress invalidPointerCast
157157 return 0 ;
158158}
159159
@@ -304,7 +304,7 @@ int8_t stdlib_ndarray_get_ptr_int8( const uint8_t *idx, int8_t *out ) {
304304* @return status code
305305*/
306306int8_t stdlib_ndarray_get_ptr_complex128 ( const uint8_t * idx , double complex * out ) {
307- * out = * (double complex * )idx ;
307+ * out = * (double complex * )idx ; // cppcheck-suppress invalidPointerCast
308308 return 0 ;
309309}
310310
@@ -321,7 +321,7 @@ int8_t stdlib_ndarray_get_ptr_complex128( const uint8_t *idx, double complex *ou
321321* @return status code
322322*/
323323int8_t stdlib_ndarray_get_ptr_complex64 ( const uint8_t * idx , float complex * out ) {
324- * out = * (float complex * )idx ;
324+ * out = * (float complex * )idx ; // cppcheck-suppress invalidPointerCast
325325 return 0 ;
326326}
327327
0 commit comments