Bug 3874 - popt/popt.c: "rc" is set but never used
popt/popt.c: "rc" is set but never used
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.23
Other Other
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-27 11:10 UTC by Jason Mader
Modified: 2006-06-30 20:03 UTC (History)
0 users

See Also:


Attachments
Change to use rc (348 bytes, patch)
2006-06-29 10:19 UTC, Jason Mader
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader 2006-06-27 11:10:35 UTC
--- popt/popt.o ---
cc-1552 c99: WARNING File = popt/popt.c, Line = 369
  The variable "rc" is set but never used.

      int rc;
          ^
Comment 1 Jeremy Allison 2006-06-28 16:58:09 UTC
Not a bug. rc is used in several platform specific #ifdefs in this code.
Jeremy.
Comment 2 Jason Mader 2006-06-29 09:46:13 UTC
I see that rc is used in the #ifdefs.

At the end of the procedure though,

    rc = execvp(argv[0], (char *const *)argv);
    return POPT_ERROR_ERRNO;

Other places in the code are doing something like,

    if (rc) return POPT_ERROR_ERRNO;

If this can be written like that, it gets rid of the compiler warning.
Comment 3 Jason Mader 2006-06-29 10:19:57 UTC
Created attachment 2004 [details]
Change to use rc
Comment 4 Jeremy Allison 2006-06-30 20:03:02 UTC
Fixed thanks !
Jeremy.