diff options
author | cbiere <cbiere@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2011-01-18 04:35:08 +0000 |
---|---|---|
committer | cbiere <cbiere@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2011-01-18 04:35:08 +0000 |
commit | 2982d579211a4d80bba3faa974d1eabb5a811705 (patch) | |
tree | 454ee164650b024d17726cb4be0dc12cb4f961f2 /mcon/U/d_volatile.U | |
parent | 4f7eb90be70e59bbee6123be2414f94fb9c5ca22 (diff) |
Fixed many units to make compiling with GCC flag -Werror possible.
Replaced exit() with return in main() due to missing #include <stdlib.h>.
Added "(void) variable;" to silence warning about unused variable.
Fixed Csym for GCC again (see FIXME tag).
Added FIXME regarding VAL_EAGAIN.
Added #define _GNU_SOURCE for pread() and pwrite() to get prototypes on GLIBC.
Removed blunt cc output redirections because you can't fix what you can't see.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@79 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/d_volatile.U')
-rw-r--r-- | mcon/U/d_volatile.U | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mcon/U/d_volatile.U b/mcon/U/d_volatile.U index f94ca4f..6ef01db 100644 --- a/mcon/U/d_volatile.U +++ b/mcon/U/d_volatile.U @@ -41,7 +41,7 @@ echo " " echo 'Checking to see if your C compiler knows about "volatile"...' >&4 $cat >try.c <<'EOCP' -int main() +int main(void) { ?X: ?X: The following seven lines added by Bill Campbell <billc@sierra.com> @@ -55,13 +55,18 @@ int main() char char_var; }; typedef unsigned short foo_t; - char *volatile foo; - volatile int bar; - volatile foo_t blech; + static char *volatile foo; + static volatile int bar; + static volatile foo_t blech; foo = foo; + (void) goo; + (void) foo; + (void) bar; + (void) blech; + return 0; } EOCP -if $cc -c $ccflags try.c >/dev/null 2>&1 ; then +if $cc -c $ccflags try.c; then val="$define" echo "Yup, it does." else |