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?
Re: unnamed type definition in parentheses
1. http://www.google.com/search?sourcei...TYPE_ALIGNMENT
2. From MSDN:
Quote:
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.
Re: unnamed type definition in parentheses
Quote:
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".
Re: unnamed type definition in parentheses
Check your project properties: C/C++->General->Treat warnings as errors.
Re: unnamed type definition in parentheses
Quote:
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.