Don't initialize variables in their declaration with non-constant

values.

svn path=/trunk/; revision=15211
This commit is contained in:
Jörg Mayer 2005-08-04 21:40:58 +00:00
parent bfd9609da2
commit 6f4033bc83
1 changed files with 8 additions and 0 deletions

View File

@ -24,6 +24,14 @@ thus run through C rather than C++ compilers, and not all C compilers
support C++-style comments (GCC does, but IBM's C compiler for AIX, for
example, doesn't do so by default).
Don't initialize variables in their declaration with non-constant
values. Not all compilers support this. E.g. don't use
guint32 i = somearray[2];
use
guint32 i;
i = somearray[2];
instead.
Don't use zero-length arrays; not all compilers support them. If an
array would have no members, just leave it out.