Warning C1801: Implicit parameter-declaration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Warning C1801: Implicit parameter-declaration

ソリューションへジャンプ
9,150件の閲覧回数
BasePointer
Contributor II
Hi,
 
I'm using CW6.0 and HCS08 C.
The compiler generates warnings for my application "Warning C1801: Implicit parameter-declaration".
And this warning causes my application not to work properly.
 
I want to take compile error with this warning. Is this possible?
 
Thanks.
 
 
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
2,823件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hi,
yes, there is a #pragma way for this

something like
#pragma MESSAGE ERROR C1801
(see manual/help files for details).

The other way is to use the
#pragma OPTION ADD xx "-Wpd"
way.

BK

元の投稿で解決策を見る

0 件の賞賛
返信
7 返答(返信)
2,823件の閲覧回数
BasePointer
Contributor II
Hi,
 
Standard Settings... -> Compile for HC08 -> Messages -> Warning Tab and I moved C1801 to the Error.
 
Now I'm taking compile error with C1801. This is exactly what I want.
 
Thank you.
BP.
0 件の賞賛
返信
2,823件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hello,
there is as well the compiler option
-Wpd          Error for implicit parameter declaration
under the MESSAGE tab which will flag implicit parameter declarations as error.

BK
0 件の賞賛
返信
2,823件の閲覧回数
BasePointer
Contributor II
Hi,
 
 I also wonder if I can do this with #pragma directions?
 
Thanks.
0 件の賞賛
返信
2,824件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hi,
yes, there is a #pragma way for this

something like
#pragma MESSAGE ERROR C1801
(see manual/help files for details).

The other way is to use the
#pragma OPTION ADD xx "-Wpd"
way.

BK
0 件の賞賛
返信
2,823件の閲覧回数
BasePointer
Contributor II
That works:
#pragma MESSAGE ERROR C1801     // Implicit parameter declaration
 
Thank you so much.
0 件の賞賛
返信
2,823件の閲覧回数
Alban
Senior Contributor II
Hello,

It is possibke to compile without warnings.
The fault is not because of the warning, but probably because you use a function in your code and you did not declare the function prototype before.

Warning and Error codes are very useful as they are described in the help of CodeWarrior.

C1801 means Compiler error. Lxxxx would mean a linker error...

Alban.
0 件の賞賛
返信
2,823件の閲覧回数
BasePointer
Contributor II
Hi Alban,
 
My project is huge and as you said I sometimes forget adding functions prototypes.
I can compile entire project successfully even if I did so.
I want compile process to fail if this warning exists for any modules of the project.
 
Or can I see all warings of modules in a list?
I can easly search C1801 in this list.
 
Regards,
BP.
0 件の賞賛
返信