hallo to everyone
and sorry for the mistakes in English
i have some warnings error in some progarm
(i worked with visual studio 2005 and 2008 and in both it's show this warning )
image is attached to show the warnings
thanks
shimon Israel
hallo to everyone
and sorry for the mistakes in English
i have some warnings error in some progarm
(i worked with visual studio 2005 and 2008 and in both it's show this warning )
image is attached to show the warnings
thanks
shimon Israel
IMHO - you should disable warning C4996 - Microsoft tries to push its own version of standard functoins. I see no reason to use them - the portability of the code suffers.
So just disable this particular warning in the project settings and be happy
PS. about another warning - you need to provide struct declaration. Are you sure you are compiling in the C-mode? Is your source file has a C extention? not cpp?
PPS. in general it means you have 2 pointers one declared with typedef like
Node* pointerA;
Another without:
struct Node* pointerB;
When you write
pointerB = pointerA; you can get that warning
Last edited by vart; 02-13-2008 at 10:05 PM.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Last edited by c9dw2rm8; 02-13-2008 at 10:36 PM.
You do not have a struct SamplingNode anywhere in your code
Post code in code tags as text - so it could be copy/pasted by others going to answer your post
IMHO == In My Humble Opinion and not what you think
Ata zarich lilmod lehishtamesh beGoggle
Ps. You should increase your warning level
lines like
struct SensorNode* Next; - should be warned by compiler as missing type declaration
Last edited by vart; 02-13-2008 at 10:42 PM.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
It will help to find out what is IMHO and others abbreviations like that
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
I strongly disagree. Microsoft did us a boon by giving more safe functions than the normal, poor buffer overrun prone functions. We should use them if possible.
They are very easy to get rid of with a wrapper function or a macro, so I see no reason to not use them.
They will help you find problems with buffer overruns in your code and stop your code from doing bad things in release. Fixes security problems.
I always define that macro to disable those warnings. I don't really see how their proprietary functions are going to be that much safer? I always know the size of my arrays and I make sure I don't overflow it. Maybe those new functions would be good for really bad programmers that don't pay attention to what they're doing, but even then, if they pass the wrong parameters to those functions it'll still cause problems.
Even the best of programmers will have bugs in their code and sometimes they'll surface. It also helps when hunting down memory bugs since it will automatically alert you if you're trying to do a buffer overrun.
I don't see much point in not using them, seeing as they're more secure (and it's far better to terminate the program than to let it run with buffer overruns in a security perspective), and it's very easy to do away with them when compiling in other compilers.
You could do a small ifdef to check if compiling with msvc, and if not, just do wrappers for the safe versions to the normal ones.