summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/popt
Commit message (Collapse)AuthorAgeFilesLines
* Clean up warnings: popt sure does some strange thingsMartin Schwenke2011-11-113-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* enabled built in popt if system doesn't have itAndrew Tridgell2007-05-032-3/+3
| | | | (This used to be ctdb commit 30c8d69267a78e1d3dea0fcc936ee2939bb7a373)
* added copies of libs so can be built standaloneAndrew Tridgell2007-01-2514-0/+3337
(This used to be ctdb commit 0bf6e6cb371bb946ea8cc1d8c7a23a41ea715832)