DragonFly submit List (threaded) for 2005-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: [PATCH] sbin/mount WARNS=6 cleanups
:mount.patch:
:
: * made appropriate functions static
: * replaced unchecked strdup():s with xstrdup()
:
:mount2.patch:
:
: Depends on mount.patch.
:
: Separate patch since I suspect this might not be so popular. It fixes
: the discarded const qualifier problem (which is fundamentally caused by
: the signature of getopt()) by duping the array before calling mount_ufs()
: and before the execv. The rest of mount.c is heavily dependent on constant
: strings and pointer acrobatics that does not play well with the idea of
: making argv a char**. I felt this was the cleaner solution.
:
: Since this removes the last triggered warning, it also bumps WARNS to 6.
:
:--
:/ Peter Schuller, InfiDyne Technologies HB
:
:PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@xxxxxxxxxxxx>'
:Key retrieval: Send an E-Mail to getpgpkey@xxxxxxxxx
:E-Mail: peter.schuller@xxxxxxxxxxxx Web: http://www.scode.org
I committed the first part. The second part is a bit too much of a hack
just to fix the qualifiers. That actually seems to me to be a bug in GCC.
It shouldn't have any problem casting char ** to char * const * but it does.
-Matt
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]