Original Question
Cygwin's CYGWIN environment variable and its contents have effect on several aspects of the Cygwin environment. If CYGWIN contains nodosfilewarning then
Cygwin will warn the first time a user uses an "MS-DOS" style path name rather than a POSIX-style path name
as stated by one of Cygwin FAQ pages.
What is first time? Once a day? Once between computer restarts?
I had set CYGWIN=nodosfilewarning, but still sometimes Cygwin warns me that I use MS-DOS style paths. If I set it to dosfilewarning (and restart my shell) I can't trigger the warning no matter what (like cd C:\\Windows—I assume this is MS-DOS-ish enough).
I don't exactly know if the CYGWIN variable have to be set at OS level or in my Cygwin shell, however I have tried both without success. By without success I mean, if the variable is set to dosfilewarning my assumption is that Cygwin should warn me every time I type something like cd C:\\Windows (which it doesn't do).
How can I verify that I set this stupid variable correctly and my settings are in effect? Cygwin's FAQ gives little help on this particular problem.
Update
Thanks to JdeBP's answer I've managed to come to the following conclusion.
The CYGWIN variable can be set either at OS level or in a Cygwin shell.
cd C:\\Windows doesn't trigger the warning at hand, but ls C:\\Windows does (talk about consistency, huh?).
For now, settings nodosfilewarning really reports no warning for the previously mentioned command, however I originally wrote this post because even though I told Cygwin not to report these warnings it still did sometimes. Unfortunately I don't know when and under what circumstances (I'll update the question if I further encounter these warnings).

cdis not a program, but a command of the shell. Probably related to that. – Daniel Beck Dec 24 '11 at 7:26