Where is the location of the error and the warning icon? I'm talking about the red octagon with a ! inside it and the yellow triangle also containing a !.
I remember that some system app had both icons in its application bundle, which you can open by dragging it to Preview.app.
A little note: Apple doesn't want you to use these icons as they are reserved for the system only.
You can find the Warning icon by dragging /System/Library/Core Services/Problem Reporter.app to Preview.app. Save the ICNS file as PNG and you're good to go — even though it's not a 512 × 512 image.
You can find a small error (32 × 32) icon at /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCBuildBadge-Error.png.