- In order to get inside the loop, rc has to be non-zero so the
switch-case is just very very pointless (the whole check seems
dubious but .. shrug)
- Remove unused optArg - if we don't look at it then no point
retrieving it either
poptContext
rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
{
- const char * optArg;
poptContext optCon;
int rc;
const char *ctx, *execPath;
/* Process all options, whine if unknown. */
while ((rc = poptGetNextOpt(optCon)) > 0) {
- optArg = poptGetOptArg(optCon);
- switch (rc) {
- default:
- fprintf(stderr, _("%s: option table misconfigured (%d)\n"),
+ fprintf(stderr, _("%s: option table misconfigured (%d)\n"),
__progname, rc);
- exit(EXIT_FAILURE);
-
- break;
- }
+ exit(EXIT_FAILURE);
}
if (rc < -1) {