This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28035:变量已设置但从未使用。

Guru**** 2546020 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/627172/tms320f28035-variable-was-set-but-never-used

器件型号:TMS320F28035

大家好、我将使用 CCS7在 F28035 controlCARD 中测试 IQmath。

我可以获得正确的结果、但警告说"test1、test2、test3、test4已设置但从未使用"。 奇怪的是、我在37、38、39、40行中使用了它们、我可以得到正确的结果。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    [引用用户="Howard Zou"]我在第37、38、39、40行中使用了这些代码,我可以得到正确的结果,这很奇怪。[/引用]

    您尚未使用这些变量、而是仅将计算结果存储到这些变量中。 您需要进一步使用这些变量、例如、 您可以尝试:

    Testx = test1 *test2* test3* test4;

    您将能够观察到先前的警告消失。

    此致、

    Gautam