【问题标题】:How to generate a splint log如何生成夹板日志
【发布时间】:2022-01-02 01:39:15
【问题描述】:

我想在 Linux 下生成一个完整的夹板报告文件,其中还包括日期和拆分工具版本。 我尝试使用“>”将 stdio 拆分输出重定向到一个文件,但在文件中我只找到了拆分消息 为了更好地解释,我在 main.c 和 stdio 上运行夹板,消息是:

**Splint 3.1.2 --- 20 Feb 2018
main.c: (in function main)
main.c:7:8: Variable c declared but not used
A variable is declared but never used. Use /*@unused@*/ in front of
declaration to suppress message. (Use -varuse to inhibit warning)
Finished checking --- 1 code warning**

现在我再次运行夹板工具:夹板 main.c > report.txt

在 report.txt 文件中,我没有找到“Splint 3.1.2 --- 2018 年 2 月 20 日”和“Finished checks --- 1 code warning”,但只有特定的夹板消息. 如何将整个夹板输出重定向到文件中? 谢谢

【问题讨论】:

  • 你是否也尝试重定向stderr
  • 它有效,谢谢

标签: c logging splint


【解决方案1】:

由于这些行是通过stderr 输出的,因此也将其重定向到您的日志文件中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-09-27
    • 2014-09-22
    • 1970-01-01
    • 1970-01-01
    • 2021-12-01
    • 2021-06-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多