IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
popt generates 4 compiler warnings with GCC 4.6. There are 2
different types:
* 3 instances of:
warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
One occurs in the _free() hack that is used to try and avoid a
compiler warning. I guess GCC got smarter? ;-)
The other is where an array of constant strings is passed to
execvp(2), which arguably has the wrong type, since it has no need
to modify the strings.
Both of these can be worked around by casting to intptr_t before
casting to the desired argument type.
In poptReadConfigFile() the variable file is declared to be a
constant string. However, it is then passed to read(2) straight
away and an attempt is made to cast away the "const". However, to
protect the value the of file is assigned to (const char *) chptr
before it is passed to any other functions, so this protects the
value anyway. I'm not sure exactly what the thinking was
here... but there seems to be no use having file be constant.
* 1 instance of:
warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
for the result of an execvp(2) call. Recast the return type to
void. However, due to some #if-fu in the function, that can make rc
unused in this function. So we also need to wrap the declaration of
rc in some corresponding #if-fu to make it disappear if not used.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ac9236e64bd0b61740cc787819a1222bc6a67d4a)