GGitee格式化输出类型存在不匹配
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
memRouter: test: Fix -Wincompatible-pointer-types warnings I ran into the following warnings, --------------------------------------------------------------------- In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c: In function ‘test_memdcd_process’: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:38:51: warning: passing argument 2 of ‘migrate_process_get_pages’ from incompatible pointer type [-Wincompatible-pointer-types] CU_ASSERT_EQUAL(migrate_process_get_pages(-1, wrong_msg->memory_msg.vma.vma_addrs), -1); ^ In file included from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:19:0: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/../../../src/memdcd_process.c:323:5: note: expected ‘const struct swap_vma_with_count *’ but argument is of type ‘struct vma_addr_with_count *’ int migrate_process_get_pages(int pid, const struct swap_vma_with_count *vma) ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/CUnit/Automated.h:41:0, from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:18: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:39:66: warning: passing argument 2 of ‘migrate_process_get_pages’ from incompatible pointer type [-Wincompatible-pointer-types] CU_ASSERT_EQUAL(migrate_process_get_pages(get_pid_max() + 1, wrong_msg->memory_msg.vma.vma_addrs), -1); ^ In file included from /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/memdcd_process_llt.c:19:0: /root/dev/etmem/memRouter/test/Unit/memdcd_process_llt_test/../../../src/memdcd_process.c:323:5: note: expected ‘const struct swap_vma_with_count *’ but argument is of type ‘struct vma_addr_with_count *’ int migrate_process_get_pages(int pid, const struct swap_vma_with_count *vma) ^~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------------------------------------- The reason for this warning is the use of the wrong member variable, and that must be an oversight. Tested on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 | |
格式化输出类型存在不匹配 Signed-off-by: chengjun8888 <chengjun_yewu@cmss.chinamobile.com> | 1 年前 | |
memRouter: test: Fix -Wdiscarded-qualifiers warnings I see the following warning in several places in the compilation output, --------------------------------------------------------------------- /root/dev/etmem/memRouter/test/test_driver/memdcd_daemon.c: In function ‘memdcd_daemon_start’: /root/dev/etmem/memRouter/test/test_driver/memdcd_daemon.c:209:12: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] return (sock_path); ^ --------------------------------------------------------------------- Fix this by performing a type casting. Tested by rebuilding on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
memRouter: test: Add missing CMake commands in CMakeList I see the following warning while running cmake command, --------------------------------------------------------------------- CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.16) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. --------------------------------------------------------------------- Fix this by just adding the missing CMake command. Tested by rebuilding on x86_64 openEuler 20.03, 22.03 and 24.03. Signed-off-by: Enze Li <lienze@kylinos.cn> | 2 年前 | |
Add unit test of memRouter. Signed-off-by: yangxin <245051644@qq.com> | 3 年前 |