完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
在文件drv_usart_mapping.c中,函数DRV_USART_CLIENT_STATUS DRV_USART_Client.(DRV_HANDLE句柄)具有statementreturnValue=DRV_CLIENT_STATUS_ERROR;但是DRV_CLIENT_STATUS_ERROR是DRV_CLIENT_STATUS枚举的成员!
以上来自于百度翻译 以下为原文 In file drv_usart_mapping.c the function DRV_USART_CLIENT_STATUS DRV_USART_ClientStatus ( DRV_HANDLE handle ) has a statement returnValue = DRV_CLIENT_STATUS_ERROR; but the DRV_CLIENT_STATUS_ERROR is a member of DRV_CLIENT_STATUS enum ! |
|
相关推荐
6个回答
|
|
|
我认为编译器应该发出警告。我不知道为什么不这样。它应该做这种类型的检查。也许有一个编译器选项需要设置(或删除)。注意:DRV_CLIENT_STATUS_ERROR和DRV_USART_CLIENT_STATUS_ERROR是相等的。但是编译器在我看来仍然应该发出警告。
以上来自于百度翻译 以下为原文 I think the compiler should be issuing a warning. I wonder why it is not. It is supposed to do type checking for this kind of thing. Perhaps there is a compiler option that needs to be set (or removed). Note: DRV_CLIENT_STATUS_ERROR and DRV_USART_CLIENT_STATUS_ERROR are equal to each other. But the compiler should still issue a warning in my opinion. |
|
|
|
|
|
如果编译器抱怨和枚举是一样的,那么谁在乎呢……问题是,是否对Harmony生成的代码进行了静态分析,因为当我运行PC-Lint时,我得到了大量的错误,而这仅仅是一个开始。
以上来自于百度翻译 以下为原文 That is not really the point here if compiler complains and enums are same so who cares... Question is if there was any static analysis done on code generated by Harmony because I am getting tons of error when I run PC-Lint and this is just a beginning. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
为什么不使用PC皮棉或类似的东西,如果他们不是被迫通过公司的政策,法规等。
以上来自于百度翻译 以下为原文 Why would anyone use PC-Lint or similar if they're not forced to by company policies, regulations etc. |
|
|
|
|
|
过了一段时间,你就习惯了。它有助于避免使用错误的枚举。我喜欢它,但是现在变得昂贵了。和谐可以真正使用它。
以上来自于百度翻译 以下为原文 You get used to it after a while. It help avoid thing like using the wrong enum. I liked it, but is getting expensive now. Harmony could really use it. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1121浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
872浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 18:40 , Processed in 0.918722 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1704