Delphi编译器警告指向Delphi自己的单元 [英] Delphi compiler warnings pointing to Delphi's own units

查看:503
本文介绍了Delphi编译器警告指向Delphi自己的单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Delphi 2007中,我们在一个包含自定义组件的项目中,当我做一个完整版本的时候,我将这组警告作为Messages的前四个警告。 p>

  [DCC警告] Dialogs.pas(1426):W1002符号'TFileOpenDialog'专用于平台
[DCC警告] Dialogs.pas(1446):W1002符号'TFileSaveDialog'是特定于平台的
[DCC警告] ComCtrls.pas(6757):W1036变量'Section'可能未初始化
[DCC警告] ComCtrls.pas(19268):W1023比较有符号和无符号类型 - 扩展两个操作数

以消除编译器警告在哪里我可以,但这些是股德尔福单位。这些警告是我的代码中间接的结果吗?如果是这样,我怎么知道什么/在哪里?

解决方案

我相信这是因为你在构建路径中有Delphi源代码。如果删除Delphi源目录,那么它应该在没有这些警告的情况下构建。


In Delphi 2007, working on a project which includes a custom component, I'm getting this set of warnings as the first four in Messages when I do a full build (but not when I do a straight compile):

[DCC Warning] Dialogs.pas(1426): W1002 Symbol 'TFileOpenDialog' is specific to a platform
[DCC Warning] Dialogs.pas(1446): W1002 Symbol 'TFileSaveDialog' is specific to a platform
[DCC Warning] ComCtrls.pas(6757): W1036 Variable 'Section' might not have been initialized
[DCC Warning] ComCtrls.pas(19268): W1023 Comparing signed and unsigned types - widened both operands

I generally try to eliminate compiler warnings where I can, but these are "stock" Delphi units. Are these warnings the indirect result of something in my code? If so, how do I figure out what/where? If not, what should I do about them?

解决方案

I believe it is because you have the stock Delphi source in your build path. If you remove the Delphi source directories, then it should build without these warnings.

这篇关于Delphi编译器警告指向Delphi自己的单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆