From 8705bddef4d01d685e69e1de01ba5488a33daa7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai=20Capot=C4=83?= Date: Tue, 26 May 2026 10:59:59 -0700 Subject: [PATCH] Fix fwrite return type It is causing a warning treated as an error in CI: https://github.com/intel/ScalableVectorSearch/pull/336#discussion_r3302332541 --- examples/cpp/shared/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cpp/shared/utils.h b/examples/cpp/shared/utils.h index f5f9f661..18a6aef4 100644 --- a/examples/cpp/shared/utils.h +++ b/examples/cpp/shared/utils.h @@ -25,7 +25,7 @@ #include int fvec_fwrite(FILE* fo, const float* v, uint32_t d) { - int ret; + size_t ret; ret = fwrite(&d, sizeof(uint32_t), 1, fo); if (ret != 1) { perror("fvec_fwrite: write error 1"); @@ -57,7 +57,7 @@ int fvecs_write(const char* fname, uint32_t d, int n, const float* vf) { } int ivec_iwrite(FILE* fo, const uint32_t* v, uint32_t d) { - int ret; + size_t ret; ret = fwrite(&d, sizeof(uint32_t), 1, fo); if (ret != 1) { perror("ivec_iwrite: write error 1");