Bug 3874 - popt/popt.c: "rc" is set but never used
Summary: popt/popt.c: "rc" is set but never used
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.23
Hardware: Other Other
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 11:10 UTC by Jason Mader (mail bounces back)
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 (mail bounces back)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader (mail bounces back) 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 (mail bounces back) 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 (mail bounces back) 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.