提交 34753d81 创建 作者: 赵鹏翀's avatar 赵鹏翀

提交作业

上级 783573b6
流水线 #153782 已通过 于阶段
用时 35 秒
......@@ -6,7 +6,7 @@ int main()
{
int x, y;
int *p = malloc(8)
int *p = malloc(8);
  • Developer

    8 bytes in 1 blocks are definitely lost in loss record 1 of 1

    0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) 0x400666: main (main.c:9) 📘
    🔽 Variable 'p' is allocated memory that is never used. 📘

Please register or sign in to reply
fun();
scanf("%d", &x);
......
  • Developer

    代码质量分析发现了 7 个问题。

    • 0 blocker
    • 🚫 0 critical
    • 2 major
    • 🔽 3 minor
    • 2 info

    2 个问题使用代码行评论的方式进行报告,请在此次变更的代码行中审阅这些问题。

    5 个额外的问题

    注意: 存在下列问题的代码行在本次提交中没有发生变更,无法使用代码行评论的方式进行报告。所以将下列问题汇总显示在这里(点击问题链接可以转到对应的源代码行):

    1. Memory leak: p 📘
    2. 🔽 Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config. (ProjectKey-172761) 📘
    3. 🔽 Variable 'b' is assigned a value that is never used. 📘
    4. keyword 'if' not followed by a single space 📘
    5. keyword 'if' not followed by a single space 📘
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论