How to disable a warning in Delphi about "return value ... might be undefined"? -


i have function gives me following warning:

[dcc warning] filename.pas(6939): w1035 return value of function 'function' might undefined

the function, however, clean, small, , have known, expected, return value. first statement in function is:

result := ''; 

and there no local variable or parameter called result either.

is there kind of pragma-like directive can surround method remove warning? delphi 2007.

unfortunately, system on delphi installation not working, therefore can't pop warning right now.

anyone know off top of head can do?

are sure have done solve warning? maybe post code at?

you can turn off warning locally way:

{$warn no_retval off} function func(...): string; begin   ... end; {$warn no_retval on} 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -