COMP: Remove warnings
This commit is contained in:
parent
daa99e753d
commit
2e1882389b
@ -513,7 +513,7 @@ const char* CommandLineArguments::GetArgv0()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
unsigned int CommandLineArguments::GetLastArgument()
|
unsigned int CommandLineArguments::GetLastArgument()
|
||||||
{
|
{
|
||||||
return (unsigned int)this->Internals->LastArgument + 1;
|
return static_cast<unsigned int>(this->Internals->LastArgument + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -338,7 +338,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
|
|||||||
{
|
{
|
||||||
if ( cc > 0 && expr[cc] == '/' && expr[cc-1] != '\\' )
|
if ( cc > 0 && expr[cc] == '/' && expr[cc-1] != '\\' )
|
||||||
{
|
{
|
||||||
last_slash = (int)cc;
|
last_slash = static_cast<int>(cc);
|
||||||
}
|
}
|
||||||
if ( cc > 0 &&
|
if ( cc > 0 &&
|
||||||
(expr[cc] == '[' || expr[cc] == '?' || expr[cc] == '*') &&
|
(expr[cc] == '[' || expr[cc] == '?' || expr[cc] == '*') &&
|
||||||
|
@ -704,7 +704,7 @@ void RegistryHelper::SetSubKey(const char* sk)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
char *RegistryHelper::Strip(char *str)
|
char *RegistryHelper::Strip(char *str)
|
||||||
{
|
{
|
||||||
int cc;
|
size_t cc;
|
||||||
size_t len;
|
size_t len;
|
||||||
char *nstr;
|
char *nstr;
|
||||||
if ( !str )
|
if ( !str )
|
||||||
@ -713,7 +713,7 @@ char *RegistryHelper::Strip(char *str)
|
|||||||
}
|
}
|
||||||
len = strlen(str);
|
len = strlen(str);
|
||||||
nstr = str;
|
nstr = str;
|
||||||
for( cc=0; cc<(int)len; cc++ )
|
for( cc=0; cc < len; cc++ )
|
||||||
{
|
{
|
||||||
if ( !isspace( *nstr ) )
|
if ( !isspace( *nstr ) )
|
||||||
{
|
{
|
||||||
@ -721,7 +721,7 @@ char *RegistryHelper::Strip(char *str)
|
|||||||
}
|
}
|
||||||
nstr ++;
|
nstr ++;
|
||||||
}
|
}
|
||||||
for( cc=int(strlen(nstr)-1); cc>=0; cc-- )
|
for( cc= strlen(nstr)-1; cc>=0; cc-- )
|
||||||
{
|
{
|
||||||
if ( !isspace( nstr[cc] ) )
|
if ( !isspace( nstr[cc] ) )
|
||||||
{
|
{
|
||||||
|
@ -237,10 +237,10 @@ SystemTools::GetTime(void)
|
|||||||
struct timeval t;
|
struct timeval t;
|
||||||
#ifdef GETTIMEOFDAY_NO_TZ
|
#ifdef GETTIMEOFDAY_NO_TZ
|
||||||
if (gettimeofday(&t) == 0)
|
if (gettimeofday(&t) == 0)
|
||||||
return (double)t.tv_sec + t.tv_usec*0.000001;
|
return static_cast<double>(t.tv_sec) + t.tv_usec*0.000001;
|
||||||
#else /* !GETTIMEOFDAY_NO_TZ */
|
#else /* !GETTIMEOFDAY_NO_TZ */
|
||||||
if (gettimeofday(&t, (struct timezone *)NULL) == 0)
|
if (gettimeofday(&t, static_cast<struct timezone *>(NULL)) == 0)
|
||||||
return (double)t.tv_sec + t.tv_usec*0.000001;
|
return static_cast<double>(t.tv_sec) + t.tv_usec*0.000001;
|
||||||
#endif /* !GETTIMEOFDAY_NO_TZ */
|
#endif /* !GETTIMEOFDAY_NO_TZ */
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_GETTIMEOFDAY */
|
#endif /* !HAVE_GETTIMEOFDAY */
|
||||||
@ -248,11 +248,12 @@ SystemTools::GetTime(void)
|
|||||||
#if defined(HAVE_FTIME)
|
#if defined(HAVE_FTIME)
|
||||||
struct TIMEB t;
|
struct TIMEB t;
|
||||||
::FTIME(&t);
|
::FTIME(&t);
|
||||||
return (double)t.time + (double)t.millitm * (double)0.001;
|
return static_cast<double>(t.time) +
|
||||||
|
static_cast<double>(t.millitm) * static_cast<double>(0.001);
|
||||||
#else /* !HAVE_FTIME */
|
#else /* !HAVE_FTIME */
|
||||||
time_t secs;
|
time_t secs;
|
||||||
time(&secs);
|
time(&secs);
|
||||||
return (double)secs;
|
return static_cast<double>(secs);
|
||||||
#endif /* !HAVE_FTIME */
|
#endif /* !HAVE_FTIME */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1246,7 +1247,7 @@ int SystemTools::EstimateFormatLength(const char *format, va_list ap)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int)length;
|
return static_cast<int>(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
kwsys_stl::string SystemTools::EscapeChars(
|
kwsys_stl::string SystemTools::EscapeChars(
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* read a header block */
|
/* read a header block */
|
||||||
int
|
static int
|
||||||
th_read_internal(TAR *t)
|
th_read_internal(TAR *t)
|
||||||
{
|
{
|
||||||
ssize_t i;
|
ssize_t i;
|
||||||
|
@ -39,10 +39,7 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp
|
|||||||
* will be copied. Always NUL terminates (unless siz == 0).
|
* will be copied. Always NUL terminates (unless siz == 0).
|
||||||
* Returns strlen(src); if retval >= siz, truncation occurred.
|
* Returns strlen(src); if retval >= siz, truncation occurred.
|
||||||
*/
|
*/
|
||||||
size_t strlcpy(dst, src, siz)
|
size_t strlcpy(char *dst, const char *src, size_t siz)
|
||||||
char *dst;
|
|
||||||
const char *src;
|
|
||||||
size_t siz;
|
|
||||||
{
|
{
|
||||||
register char *d = dst;
|
register char *d = dst;
|
||||||
register const char *s = src;
|
register const char *s = src;
|
||||||
|
@ -126,19 +126,19 @@ int libtar_gzopen(void* call_data, const char *pathname, int oflags, mode_t mode
|
|||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
int libtar_gzclose(void* call_data)
|
static int libtar_gzclose(void* call_data)
|
||||||
{
|
{
|
||||||
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
||||||
return cm_zlib_gzclose(gzf->GZFile);
|
return cm_zlib_gzclose(gzf->GZFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t libtar_gzread(void* call_data, void* buf, size_t count)
|
static ssize_t libtar_gzread(void* call_data, void* buf, size_t count)
|
||||||
{
|
{
|
||||||
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
||||||
return cm_zlib_gzread(gzf->GZFile, buf, count);
|
return cm_zlib_gzread(gzf->GZFile, buf, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t libtar_gzwrite(void* call_data, const void* buf, size_t count)
|
static ssize_t libtar_gzwrite(void* call_data, const void* buf, size_t count)
|
||||||
{
|
{
|
||||||
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
struct gzStruct* gzf = (struct gzStruct*)call_data;
|
||||||
return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
|
return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
|
||||||
@ -212,7 +212,7 @@ create(char *tarfile, char *rootdir, libtar_list_t *l)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
list(char *tarfile)
|
list(char *tarfile)
|
||||||
{
|
{
|
||||||
TAR *t;
|
TAR *t;
|
||||||
@ -272,7 +272,7 @@ list(char *tarfile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
static int
|
||||||
extract(char *tarfile, char *rootdir)
|
extract(char *tarfile, char *rootdir)
|
||||||
{
|
{
|
||||||
TAR *t;
|
TAR *t;
|
||||||
@ -316,7 +316,7 @@ extract(char *tarfile, char *rootdir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
printf("Usage: %s [-C rootdir] [-g] [-z] -x|-t filename.tar\n",
|
printf("Usage: %s [-C rootdir] [-g] [-z] -x|-t filename.tar\n",
|
||||||
|
@ -434,7 +434,8 @@ int
|
|||||||
/*
|
/*
|
||||||
** @LISTHASH_PREFIX@_list_merge() - merge two lists into a new list
|
** @LISTHASH_PREFIX@_list_merge() - merge two lists into a new list
|
||||||
*/
|
*/
|
||||||
@LISTHASH_PREFIX@_list_t *
|
/*
|
||||||
|
static @LISTHASH_PREFIX@_list_t *
|
||||||
@LISTHASH_PREFIX@_list_merge(@LISTHASH_PREFIX@_cmpfunc_t cmpfunc, int flags,
|
@LISTHASH_PREFIX@_list_merge(@LISTHASH_PREFIX@_cmpfunc_t cmpfunc, int flags,
|
||||||
@LISTHASH_PREFIX@_list_t *list1,
|
@LISTHASH_PREFIX@_list_t *list1,
|
||||||
@LISTHASH_PREFIX@_list_t *list2)
|
@LISTHASH_PREFIX@_list_t *list2)
|
||||||
@ -453,5 +454,6 @@ int
|
|||||||
|
|
||||||
return newlist;
|
return newlist;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user