473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Inline warning Supression

Does VB.NET have any support for inline warning suppression like C#? I am
porting a project from VB.NET 2003 to VB.NET 2005 and I have a bunch of
warnings that after careful examination are benign. I would like to be able
to mark those lines of code so that the warnings to not appear. I do not
want to use a global suppression of the warning check since there may be a
time when adding code that the warning is required to be issued and
addressed.
Thanks,
Sid.
Oct 29 '07 #1
4 1430
On Oct 29, 10:40 am, "Sid Price" <s...@nowhere.comwrote:
Does VB.NET have any support for inline warning suppression like C#? I am
porting a project from VB.NET 2003 to VB.NET 2005 and I have a bunch of
warnings that after careful examination are benign. I would like to be able
to mark those lines of code so that the warnings to not appear. I do not
want to use a global suppression of the warning check since there may be a
time when adding code that the warning is required to be issued and
addressed.
Thanks,
Sid.
Sid,

Other then fixing the warnings - then what you see in the compile
section of the project properties is all you get.

--
Tom Shelton

Oct 30 '07 #2
Thanks Tom, that is a pity. Being able silence warnings that are benign is
very useful,
Sid.

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@o38g2000hse.googlegr oups.com...
On Oct 29, 10:40 am, "Sid Price" <s...@nowhere.comwrote:
>Does VB.NET have any support for inline warning suppression like C#? I am
porting a project from VB.NET 2003 to VB.NET 2005 and I have a bunch of
warnings that after careful examination are benign. I would like to be
able
to mark those lines of code so that the warnings to not appear. I do not
want to use a global suppression of the warning check since there may be
a
time when adding code that the warning is required to be issued and
addressed.
Thanks,
Sid.

Sid,

Other then fixing the warnings - then what you see in the compile
section of the project properties is all you get.

--
Tom Shelton

Oct 30 '07 #3
Sid Price wrote:
Being able silence warnings that are benign is very useful
But if the condition in question is totally "benign", why is it being
flagged up with a Warning in the first place? Presumably, there has to
be some /reason/ why the compiler is telling you about them.

Just out of interest, which ones /are/ you considering ignoring?

Regards,
Phill W.
Oct 30 '07 #4
"Phill W." wrote:
>>But if the condition in question is totally "benign", why is it being
flagged up with a Warning in the first place?
The compiler only has knowledge of the direct context of the line of code
and the warnings are more often than not warnings that do not (indeed can
not) have real meaning in the context of the complete application using the
code, indeed this is acknowledged in the help file describing these
warnings. As an example consider this warning:

Type of member '<membername>' is not CLS-compliant

And the following comment in the "To correct this error" paragraph:

a.. If your component interfaces only with other .NET Framework components,
or does not interface with any other components, you do not need to change
anything.
The other warnings are very similar in nature. While one appreciates a well
written compiler raising such warnings it is not omnipotent and therefore a
mechanism should be available to suppress specific warnings on an instance
by instance basis rather than the rather more dangerous suppression of the
warning globally.

Sid.
Oct 30 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: A | last post by:
Hi, I'm having problems completing a project in C++. I have been using inline functions in some of my header files. I have only done so for simple functions that only have 1 statement (eg....
6
by: John Ratliff | last post by:
I was reading the C++ FAQ Lite about inline functions, and it says the following (http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.7) " It's usually imperative that the...
5
by: Ondrej Spanel | last post by:
I though that inline functions should be always visible only in the compilation unit where they are defined - meaning if compiler cannot inline them, they should be handled as if declared static....
13
by: jamihuq | last post by:
Can someone please tell me what I am doing wrong. I wrote this static inline function to test another function and I am getting errors which make no sense to me. thanks Jami /* test2.h */ ...
7
by: ypjofficial | last post by:
Hello All, Inline before a function definition is just a request to the compiler to make the function inline. The compiler may or maynot make it inline.. My question is ..is there any way by...
33
by: Robert Seacord | last post by:
When writing C99 code is a reasonable recommendation to use inline functions instead of macros? What sort of things is it still reasonable to do using macros? For example, is it reasonable to...
8
by: siddhu | last post by:
Dear experts, A virtual function has to have an address. So if an inline virtual function is actually inlined then in that case what does address of this function signify? How does compiler know...
6
by: MiG | last post by:
Hello, I would like to know if including the body of a function in its class declaration results in the function being inlined. In other words, is the following code... template <typename...
6
by: Laurent Deniau | last post by:
When I compile the code below with gcc -std=c99 -W -Wall -pedantic -O3 -Winline, it reports the following: variadic.c: In function ‘fv’: variadic.c:12: warning: function ‘fv’ can never be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.