|
-
October 29th, 2009, 05:01 AM
#1
unnamed type definition in parentheses
when I use vc6 to compile a driver.
I get the error:
error C4116: unnamed type definition in parentheses
this is the code that the error point to:
ProbeForRead(Irp->UserBuffer, pIoStackIrp->Parameters.Write.Length, TYPE_ALIGNMENT(char));
what does TYPE_ALIGNMENT(char)) mean, and why it case the error?
-
October 29th, 2009, 05:05 AM
#2
Re: unnamed type definition in parentheses
1. http://www.google.com/search?sourcei...TYPE_ALIGNMENT
2. From MSDN:
Compiler Warning (level 1) C4116
unnamed type definition in parentheses
A structure, union, or enumerated type with no name was defined in a parenthetical expression. The type definition is meaningless.
In a C function call, the definition has global scope. In a C++ function call, the definition has the same scope as the function being called.
Victor Nijegorodov
-
October 29th, 2009, 05:37 AM
#3
Re: unnamed type definition in parentheses
 Originally Posted by VictorN
I also want to know why MSDN says it's a "warning" but when I build the code, the IDE prompts me an "error".
-
October 29th, 2009, 05:43 AM
#4
Re: unnamed type definition in parentheses
Check your project properties: C/C++->General->Treat warnings as errors.
-
October 29th, 2009, 08:09 AM
#5
Re: unnamed type definition in parentheses
 Originally Posted by Nikitozz
Check your project properties: C/C++->General->Treat warnings as errors.
What I made is a driver,and the project doesn't have that settings.The user mode app is different from driver. I only view the vc6 as a higher editor.
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
|