-
February 9th, 2012, 09:28 PM
#1
error C2220: warning treated as error - no object file generated?
I feel very stupid for asking but i am stuck on this error when trying to build this driver in win2kddk
the error is as follows
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(454) : error C2220: warning treated as error - no object file generated
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(454) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(469) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(484) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(499) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(514) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(529) : warning C4018: '<' : signed/unsigned mismatch
c:\WINDDK\tmp\btcap\BtDigitizer.cpp(599) : warning C4018: '<' : signed/unsigned mismatch
the set of code for line 454 is below
// Second, the SVideo inputs if we have them.
DWORD VideoInPin = Pin;
DWORD Idx = GUID_INDEX;
for (DWORD PinToDo = 0; Idx < GUID_COUNT && PinToDo < GetBtCard().SVideoInputCount(); PinToDo++) {
BtXBar::InputPinInfo[Pin].Direction = KSPIN_DATAFLOW_IN;
BtXBar::InputPinInfo[Pin].Conn = VideoConSVideo0 + PinToDo;
BtXBar::InputPinInfo[Pin].PinType = KS_PhysConn_Video_SVideo;
BtXBar::InputPinInfo[Pin].RelatedPinIndex = 0;/*the audio pin*/
BtXBar::InputPinInfo[Pin].Medium.Set = STATIC_GUID[Idx];
BtXBar::InputPinInfo[Pin].Medium.Id = Instance;
BtXBar::InputPinInfo[Pin].Medium.Flags = 0;
BtXBar::Mediums[Pin] = BtXBar::InputPinInfo[Pin].Medium;
BtXBar::PinDirection[Pin] = FALSE;
Idx++;
Pin++;
}
If anything else is needed to make since of this error please let me know.
Thanks,
Yonu
-
February 10th, 2012, 06:46 AM
#2
Re: error C2220: warning treated as error - no object file generated?
First, see Compiler Error C2220
After that, decide if you want to simply remove /WX compiler option or fix the warning cause.
If you want to fix the warning (this one I recommend), take a look at Compiler Warning C4018
-
February 10th, 2012, 01:17 PM
#3
Re: error C2220: warning treated as error - no object file generated?
thanks for the info however I have been building without /WX so not sure what to change as to fixing it I hate to say this as I am new to this but that doesn't make much sense to me.
Sorry,
yonu
-
February 11th, 2012, 05:00 PM
#4
Re: error C2220: warning treated as error - no object file generated?
can anyone advise me on how to resolve this? sorry just never worked with drivers before
-
February 12th, 2012, 03:50 AM
#5
Re: error C2220: warning treated as error - no object file generated?
There is not a matter of drivers development but a basic C/C++ mistake.
I have already advise what to do in post #2.
Isn't MSDN Library available for you?
MSDN Library: Compiler Warning C4018
Comparing a signed and unsigned number required the compiler to convert the signed value to unsigned.
This warning may be fixed if you cast one of the two types when testing signed and unsigned types.
Or you can to change types declared in your program in order to avoid signed/unsigned mismatch.
Need more advices?
-
February 12th, 2012, 10:27 AM
#6
Re: error C2220: warning treated as error - no object file generated?
yes I looked at what it said on msdn however that makes very little sense to me sorry I am not fluent in c or c++
as to changing eh types I have no idea what to change them to
-
December 2nd, 2012, 11:45 AM
#7
Re: error C2220: warning treated as error - no object file generated?
Hi, I've just had this error and felt dumb for asking too. My error was actually that I was declaring a variable that I wasn't using.
This post helped track down my dumbness but I would like to add, the people who are answering questions, please note, those of us asking questions aren't as good as you lot and we wouldn't ask if we knew the answer. A little bit more patients might be nice?
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|