fixed compilation warnings
This commit is contained in:
parent
ee5539e668
commit
58e1dad6cc
@ -351,10 +351,12 @@ int readRPM(const char *fileName, Spec *specp, struct rpmlead *lead,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*@unchecked@*/
|
||||
static unsigned char header_magic[8] = {
|
||||
0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#endif
|
||||
|
||||
#define RPMPKGVERSION_MIN 30004
|
||||
#define RPMPKGVERSION_MAX 40003
|
||||
@ -391,7 +393,7 @@ int writeRPM(Header *hdrp, const char *fileName, int type,
|
||||
const char * sigtarget;
|
||||
const char * rpmio_flags = NULL;
|
||||
const char * sha1 = NULL;
|
||||
char *s;
|
||||
const char *s;
|
||||
char buf[BUFSIZ];
|
||||
Header h;
|
||||
Header sig = NULL;
|
||||
|
@ -176,7 +176,6 @@ static int checkOwners(const char * urlfn)
|
||||
{
|
||||
const char *fn, *urlfn;
|
||||
static char buf[BUFSIZ];
|
||||
char *t = NULL;
|
||||
struct Source *sp;
|
||||
rpmCompressedMagic compressed = COMPRESSED_NOT;
|
||||
int urltype;
|
||||
|
@ -1,26 +1,25 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include "system.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/limits.h>
|
||||
#endif
|
||||
|
||||
int rpm_close_all( void )
|
||||
int rpm_close_all (void)
|
||||
{
|
||||
int fd, max;
|
||||
|
||||
max = sysconf(_SC_OPEN_MAX);
|
||||
if ( max <= 0 )
|
||||
max = sysconf (_SC_OPEN_MAX);
|
||||
if (max <= 0)
|
||||
return -1;
|
||||
|
||||
#ifdef __linux__
|
||||
if ( max < NR_OPEN )
|
||||
if (max < NR_OPEN)
|
||||
max = NR_OPEN;
|
||||
#endif
|
||||
|
||||
for ( fd = STDERR_FILENO + 1; fd < max; ++fd )
|
||||
for (fd = STDERR_FILENO + 1; fd < max; ++fd)
|
||||
{
|
||||
if ( close(fd) && errno != EBADF )
|
||||
if (close (fd) && errno != EBADF)
|
||||
/*
|
||||
* Possible errors are:
|
||||
* EINTR: the close() call was interrupted by a signal;
|
||||
|
@ -2,10 +2,6 @@
|
||||
* \file lib/depends.c
|
||||
*/
|
||||
|
||||
/*@-exportheadervar@*/
|
||||
/*@unused@*/ static int _depends_debug = 0;
|
||||
/*@=exportheadervar@*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include "rpmlib.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
#include <ctype.h>
|
||||
|
||||
#include <header_internal.h>
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "misc.h"
|
||||
#include "debug.h"
|
||||
#include "rpmio_internal.h"
|
||||
|
||||
/*@access FD_t@*/ /* compared with NULL */
|
||||
|
||||
@ -982,6 +983,7 @@ static inline int RPMClass(void)
|
||||
return 5;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* should only be called for model 6 CPU's */
|
||||
static int is_athlon(void)
|
||||
/*@*/
|
||||
@ -1008,6 +1010,7 @@ static int is_athlon(void)
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -785,7 +785,7 @@ verifyGPGSignature(const char * datafile, const void * sig, int count,
|
||||
/*@globals rpmGlobalMacroContext, fileSystem @*/
|
||||
/*@modifies *result, rpmGlobalMacroContext, fileSystem @*/
|
||||
{
|
||||
char *sigfile = 0;
|
||||
const char *sigfile = 0;
|
||||
|
||||
/* Write out the signature */
|
||||
{ FD_t sfd;
|
||||
|
@ -924,6 +924,7 @@ static int closeCallback(FILE * f) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
*/
|
||||
static PyObject * doFopen(PyObject * self, PyObject * args) {
|
||||
@ -973,6 +974,7 @@ static PyObject * doFopen(PyObject * self, PyObject * args) {
|
||||
|
||||
return PyFile_FromFile (node->f, path, mode, closeCallback);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
*/
|
||||
|
@ -5,7 +5,9 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#ifdef DYING
|
||||
/*@unused@*/ static int _debug = 1; /* XXX if < 0 debugging, > 0 unusual error returns */
|
||||
#endif
|
||||
|
||||
#define _mymemset(_a, _b, _c)
|
||||
|
||||
|
@ -330,6 +330,7 @@ static int db3c_del(dbiIndex dbi, DBC * dbcursor, u_int32_t flags)
|
||||
return rc;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*@unused@*/ static int db3c_dup(dbiIndex dbi, DBC * dbcursor, DBC ** dbcp,
|
||||
u_int32_t flags)
|
||||
/*@globals fileSystem @*/
|
||||
@ -344,6 +345,7 @@ static int db3c_del(dbiIndex dbi, DBC * dbcursor, u_int32_t flags)
|
||||
return rc;
|
||||
/*@=nullstate @*/
|
||||
}
|
||||
#endif
|
||||
|
||||
static int db3c_get(dbiIndex dbi, DBC * dbcursor,
|
||||
DBT * key, DBT * data, u_int32_t flags)
|
||||
|
@ -3,7 +3,9 @@
|
||||
* \file rpmio/macro.c
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/*@unused@*/ static int _debug = 0;
|
||||
#endif
|
||||
|
||||
#include "system.h"
|
||||
#include <stdarg.h>
|
||||
@ -1630,7 +1632,7 @@ rpmInitMacrofile (const char *macrofile)
|
||||
static void
|
||||
rpmInitMacrofileGlob (const char *macrofile)
|
||||
{
|
||||
int is_local = strchr (macrofile, '~');
|
||||
int is_local = strchr (macrofile, '~') ? 1 : 0;
|
||||
|
||||
if (is_local || strchr (macrofile, '*'))
|
||||
{
|
||||
|
@ -98,9 +98,6 @@ void rpmlogOpen (/*@unused@*/ const char *ident, /*@unused@*/ int option,
|
||||
/*@unchecked@*/
|
||||
static unsigned rpmlogMask = RPMLOG_UPTO( RPMLOG_NOTICE );
|
||||
|
||||
/*@unchecked@*/
|
||||
static /*@unused@*/ unsigned rpmlogFacility = RPMLOG_USER;
|
||||
|
||||
int rpmlogSetMask (int mask)
|
||||
/*@globals rpmlogMask @*/
|
||||
/*@modifies rpmlogMask @*/
|
||||
@ -154,7 +151,6 @@ static void vrpmlog (unsigned code, const char *fmt, va_list ap)
|
||||
{
|
||||
unsigned pri = RPMLOG_PRI(code);
|
||||
unsigned mask = RPMLOG_MASK(pri);
|
||||
/*@unused@*/ unsigned fac = RPMLOG_FAC(code);
|
||||
char *msgbuf, *msg;
|
||||
int msgnb = BUFSIZ, nb;
|
||||
FILE * msgout = stderr;
|
||||
|
@ -622,6 +622,7 @@ static const char * pgpPublicRSA[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifdef NOTYET
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
static const char * pgpSecretRSA[] = {
|
||||
" d =",
|
||||
@ -630,6 +631,7 @@ static const char * pgpSecretRSA[] = {
|
||||
" u =",
|
||||
NULL,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
static const char * pgpPublicDSA[] = {
|
||||
@ -640,11 +642,13 @@ static const char * pgpPublicDSA[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifdef NOTYET
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
static const char * pgpSecretDSA[] = {
|
||||
" x =",
|
||||
NULL,
|
||||
};
|
||||
#endif
|
||||
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
static const char * pgpPublicELGAMAL[] = {
|
||||
@ -654,11 +658,13 @@ static const char * pgpPublicELGAMAL[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifdef NOTYET
|
||||
/*@observer@*/ /*@unchecked@*/
|
||||
static const char * pgpSecretELGAMAL[] = {
|
||||
" x =",
|
||||
NULL,
|
||||
};
|
||||
#endif
|
||||
/*@=varuse =readonlytrans @*/
|
||||
|
||||
static const byte * pgpPrtPubkeyParams(byte pubkey_algo,
|
||||
|
@ -9,6 +9,7 @@
|
||||
#endif
|
||||
|
||||
#include "rpmio_internal.h"
|
||||
#include "rpmmacro.h"
|
||||
#include <popt.h>
|
||||
#include "ugid.h"
|
||||
#include "debug.h"
|
||||
|
3
system.h
3
system.h
@ -574,4 +574,7 @@ extern void unsetenv(const char *name);
|
||||
#ifndef MOUNTED
|
||||
#define MOUNTED "/etc/mnttab"
|
||||
#endif
|
||||
|
||||
extern int rpm_close_all (void);
|
||||
|
||||
#endif /* H_SYSTEM */
|
||||
|
@ -63,6 +63,7 @@ marc@redhat.com and ewt@redhat.com.
|
||||
#include <ctype.h>
|
||||
#include <netinet/in.h>
|
||||
*/
|
||||
#include <ctype.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "debug.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user