提交 27cf6512 创建 作者: 宋海霞's avatar 宋海霞

提交作业

上级 7c3030a3
流水线 #156418 已通过 于阶段
用时 33 秒
...@@ -15,15 +15,15 @@ int main(int argc, char *argv[]) ...@@ -15,15 +15,15 @@ int main(int argc, char *argv[])
printf("The argument supplied is %s\n", argv[1]); printf("The argument supplied is %s\n", argv[1]);
} }
FILE* fp2 = fopen("specifyfile", "rb"); // FILE* fp2 = fopen("specifyfile", "rb");
if (fp2 != NULL) { // if (fp2 != NULL) {
fread(&x, sizeof(int), 1, fp2); // fread(&x, sizeof(int), 1, fp2);
fread(&y, sizeof(int), 1, fp2); // fread(&y, sizeof(int), 1, fp2);
fread(&m, sizeof(float), 1, fp2); // fread(&m, sizeof(float), 1, fp2);
} // }
fclose(fp2); // fclose(fp2);
// FILE* fp = fopen(argv[1], "wb"); // FILE* fp = fopen(argv[1], "wb");
......
  • Developer

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

    • 0 blocker
    • 🚫 0 critical
    • 0 major
    • 🔽 5 minor
    • 1 info

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

    1. 🔽 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-176961) 📘
    2. 🔽 Variable 'b' is assigned a value that is never used. 📘
    3. 🔽 Variable 'x' is assigned a value that is never used. 📘
    4. 🔽 Variable 'y' is assigned a value that is never used. 📘
    5. 🔽 Variable 'm' is assigned a value that is never used. 📘
    6. keyword 'if' not followed by a single space 📘
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论