Make sure variables are declared at the beginning of a block.
if (file != cinfo->metalink && file != cinfo->mirrorlist)
{
unsigned char mlchksum[32];
+ Id mlchksumtype;
fp = curlfopen(cinfo, cinfo->metalink ? cinfo->metalink : cinfo->mirrorlist, 0, 0, 0, 0);
- Id mlchksumtype = 0;
+ mlchksumtype = 0;
if (!fp)
return 0;
if (cinfo->metalink)
Solvable *s;
int j;
FILE *fp;
+ Id type;
p = trans->steps.elements[i];
s = pool_id2solvable(pool, p);
- Id type = transaction_type(trans, p, SOLVER_TRANSACTION_RPM_ONLY);
+ type = transaction_type(trans, p, SOLVER_TRANSACTION_RPM_ONLY);
switch(type)
{
case SOLVER_TRANSACTION_ERASE:
cclose
);
#elif defined(HAVE_FOPENCOOKIE)
- cookie_io_functions_t cio;
- memset(&cio, 0, sizeof(cio));
- if (*mode == 'r')
- cio.read = cread;
- else if (*mode == 'w')
- cio.write = cwrite;
- cio.close = cclose;
- return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
+ {
+ cookie_io_functions_t cio;
+ memset(&cio, 0, sizeof(cio));
+ if (*mode == 'r')
+ cio.read = cread;
+ else if (*mode == 'w')
+ cio.write = cwrite;
+ cio.close = cclose;
+ return fopencookie(cookie, *mode == 'w' ? "w" : "r", cio);
+ }
#else
# error Need to implement custom I/O
#endif
{
/* check if identical to feature rule */
Id p = solv->rules[v].p;
+ Rule *r;
if (p <= 0)
continue;
- Rule *r = solv->rules + solv->featurerules + (p - solv->installed->start);
+ r = solv->rules + solv->featurerules + (p - solv->installed->start);
if (!r->p)
{
/* update rule == feature rule */