Remove const type-qualifiers from function return types everywhere.

They're meaningless in C and cause tonne of build warnings.
This commit is contained in:
Panu Matilainen 2007-07-10 12:15:43 +03:00
parent f64a1a327b
commit 049674696d
19 changed files with 27 additions and 27 deletions

View File

@ -205,7 +205,7 @@ gid_t getGidS(const char *gname)
}
/*@=boundswrite@*/
int_32 *const getBuildTime(void)
int_32 * getBuildTime(void)
{
static int_32 buildTime[1];
@ -217,7 +217,7 @@ int_32 *const getBuildTime(void)
}
/*@-boundswrite@*/
const char *const buildHost(void)
const char * buildHost(void)
{
static char hostname[1024];
static int oneshot = 0;

View File

@ -154,13 +154,13 @@ gid_t getGidS(const char * gname)
* Return build hostname.
* @return build hostname
*/
extern /*@observer@*/ const char * const buildHost(void) /*@*/;
extern /*@observer@*/ const char * buildHost(void) /*@*/;
/** \ingroup rpmbuild
* Return build time stamp.
* @return build time stamp
*/
extern /*@observer@*/ int_32 * const getBuildTime(void) /*@*/;
extern /*@observer@*/ int_32 * getBuildTime(void) /*@*/;
/** \ingroup rpmbuild
* Read next line from spec file.

View File

@ -193,7 +193,7 @@ int cpioHeaderRead(FSM_t fsm, struct stat * st)
return 0;
}
const char *const cpioStrerror(int rc)
const char * cpioStrerror(int rc)
{
static char msg[256];
char *s;

View File

@ -132,7 +132,7 @@ int cpioHeaderRead(FSM_t fsm, struct stat * st)
* @param rc error code
* @return formatted error string
*/
/*@observer@*/ const char *const cpioStrerror(int rc)
/*@observer@*/ const char * cpioStrerror(int rc)
/*@*/;
#ifdef __cplusplus

View File

@ -949,7 +949,7 @@ static void markLoop(/*@special@*/ tsortInfo tsi, rpmte q)
/*@=branchstate@*/
}
static inline /*@observer@*/ const char * const identifyDepend(int_32 f)
static inline /*@observer@*/ const char * identifyDepend(int_32 f)
/*@*/
{
if (isLegacyPreReq(f))

View File

@ -2448,7 +2448,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
/*@=compmempass@*/
/*@=boundsread@*/
/*@obserever@*/ const char *const fileActionString(fileAction a)
/*@obserever@*/ const char * fileActionString(fileAction a)
{
switch (a) {
case FA_UNKNOWN: return "unknown";
@ -2468,7 +2468,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
/*@notreached@*/
}
/*@observer@*/ const char *const fileStageString(fileStage a) {
/*@observer@*/ const char * fileStageString(fileStage a) {
switch(a) {
case FSM_UNKNOWN: return "unknown";

View File

@ -211,14 +211,14 @@ extern "C" {
* @param a file stage
* @return formatted string
*/
/*@observer@*/ const char *const fileStageString(fileStage a) /*@*/;
/*@observer@*/ const char * fileStageString(fileStage a) /*@*/;
/**
* Return formatted string representation of file disposition.
* @param a file dispostion
* @return formatted string
*/
/*@observer@*/ const char *const fileActionString(fileAction a) /*@*/;
/*@observer@*/ const char * fileActionString(fileAction a) /*@*/;
/*@=exportlocal@*/
/**

View File

@ -450,7 +450,7 @@ static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
* @param tag scriptlet tag
* @return name of scriptlet
*/
static /*@observer@*/ const char * const tag2sln(int tag)
static /*@observer@*/ const char * tag2sln(int tag)
/*@*/
{
switch (tag) {
@ -1207,7 +1207,7 @@ static rpmRC runImmedTriggers(rpmpsm psm)
return rc;
}
/*@observer@*/ static const char *const pkgStageString(pkgStage a)
/*@observer@*/ static const char * pkgStageString(pkgStage a)
/*@*/
{
switch(a) {

View File

@ -484,7 +484,7 @@ rpmfi rpmfiInitD(rpmfi fi, int dx)
* @return string to identify a file type
*/
static /*@observer@*/
const char *const ftstring (fileTypes ft)
const char * ftstring (fileTypes ft)
/*@*/
{
switch (ft) {
@ -628,7 +628,7 @@ fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
/*@=boundsread@*/
/*@observer@*/
const char *const rpmfiTypeString(rpmfi fi)
const char * rpmfiTypeString(rpmfi fi)
{
switch(rpmteType(fi->te)) {
case TR_ADDED: return " install";

View File

@ -626,7 +626,7 @@ fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
*/
/*@-redef@*/
/*@observer@*/
const char *const rpmfiTypeString(rpmfi fi)
const char * rpmfiTypeString(rpmfi fi)
/*@*/;
/*@=redef@*/

View File

@ -1081,7 +1081,7 @@ int tagType(int tag)
* @return tag name, "(unknown)" on not found
*/
/*@-redecl@*/
/*@observer@*/ extern const char *const tagName(int tag)
/*@observer@*/ extern const char * tagName(int tag)
/*@*/;
/*@=redecl@*/

View File

@ -458,7 +458,7 @@ dbiIndex db3New(rpmdb rpmdb, rpmTag rpmtag)
/*@=bounds@*/
/*@-boundswrite@*/
const char *const prDbiOpenFlags(int dbflags, int print_dbenv_flags)
const char * prDbiOpenFlags(int dbflags, int print_dbenv_flags)
{
static char buf[256];
struct poptOption *opt;

View File

@ -482,7 +482,7 @@ dbiIndex db3Free( /*@only@*/ /*@null@*/ dbiIndex dbi)
*/
/*@-redecl@*/
/*@exposed@*/
extern const char *const prDbiOpenFlags(int dbflags, int print_dbenv_flags)
extern const char * prDbiOpenFlags(int dbflags, int print_dbenv_flags)
/*@*/;
/*@=redecl@*/

View File

@ -32,7 +32,7 @@ int tagType(int tag)
return tagtype;
}
const char *const tagName(int tag)
const char * tagName(int tag)
{
static char nameBuf[128]; /* XXX yuk */
char *s;

View File

@ -68,7 +68,7 @@ int argiCount(ARGI_t argi)
return nvals;
}
const ARGint_t argiData(const ARGI_t argi)
ARGint_t argiData(const ARGI_t argi)
{
ARGint_t vals = NULL;
if (argi && argi->nvals > 0)
@ -85,7 +85,7 @@ int argvCount(const ARGV_t argv)
return argc;
}
const ARGV_t argvData(const ARGV_t argv)
ARGV_t argvData(const ARGV_t argv)
{
/*@-retalias -temptrans @*/
return argv;

View File

@ -61,7 +61,7 @@ int argiCount(/*@null@*/ const ARGI_t argi)
* @return argi array data address
*/
/*@null@*/
const ARGint_t argiData(/*@null@*/ const ARGI_t argi)
ARGint_t argiData(/*@null@*/ const ARGI_t argi)
/*@*/;
/**
@ -78,7 +78,7 @@ int argvCount(/*@null@*/ const ARGV_t argv)
* @return argv array data address
*/
/*@null@*/
const ARGV_t argvData(/*@null@*/ const ARGV_t argv)
ARGV_t argvData(/*@null@*/ const ARGV_t argv)
/*@*/;
/**

View File

@ -687,7 +687,7 @@ fprintf(stderr, "*** read: fd %p rc %d EOF errno %d %s \"%s\"\n", fd, rc, errno,
/* =============================================================== */
/* Support for FTP/HTTP I/O.
*/
const char *const ftpStrerror(int errorNumber)
const char * ftpStrerror(int errorNumber)
{
switch (errorNumber) {
case 0:

View File

@ -599,7 +599,7 @@ typedef enum ftperrCode_e {
/**
*/
/*@-redecl@*/
/*@observer@*/ const char *const ftpStrerror(int errorNumber)
/*@observer@*/ const char * ftpStrerror(int errorNumber)
/*@*/;
/*@=redecl@*/

View File

@ -19,7 +19,7 @@ static int noDeps = 1;
static rpmVSFlags vsflags = 0;
static inline /*@observer@*/ const char * const identifyDepend(int_32 f)
static inline /*@observer@*/ const char * identifyDepend(int_32 f)
/*@*/
{
if (isLegacyPreReq(f))