Modify incompability code in 64bit 91/281291/6
authorjiyong.min <jiyong.min@samsung.com>
Thu, 15 Sep 2022 08:03:35 +0000 (17:03 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Fri, 16 Sep 2022 03:40:36 +0000 (12:40 +0900)
In 64bit build, a pointer and a 32-bit integer should not mixed in union.
https://pvs-studio.com/en/blog/posts/cpp/a0004/ (7. Memsize types in unions)

Change-Id: I53646a6e56b2d187493ff7d46fc07c7f80ece676

tests/mm_file_test.c

index c9716cb..66eacc5 100755 (executable)
@@ -61,7 +61,7 @@ static struct timeval start, finish;
 
 typedef struct _mmfile_value {
        int len;
-       union {
+       struct {
                int i_val;
                double d_val;
                char *s_val;