1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Removed some more compiler warnings.

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15142 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2006-09-22 09:02:51 +00:00
parent d6e18a9266
commit 502d1aaab7
27 changed files with 84 additions and 79 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: amiga_argarrayinit.c,v 1.5 2006-09-21 09:24:20 obarthel Exp $
* $Id: amiga_argarrayinit.c,v 1.6 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -75,7 +75,7 @@ ArgArrayInit(LONG argc, CONST_STRPTR * argv)
goto out;
for(i = 1 ; i < argc ; i++)
CXLIB_argarray[i-1] = argv[i];
CXLIB_argarray[i-1] = (unsigned char *)argv[i];
result = (STRPTR *)CXLIB_argarray;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: amiga_rexxvars.c,v 1.7 2006-01-08 12:04:22 obarthel Exp $
* $Id: amiga_rexxvars.c,v 1.8 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -154,7 +154,7 @@ CheckRexxMsg(struct RexxMsg *message)
LONG
GetRexxVar(struct RexxMsg *message,STRPTR variable_name,STRPTR *buffer_pointer)
{
static UBYTE buffer[256];
static TEXT buffer[256];
LONG result;
/* The following uses a function which was added to rexxsyslib.library V45.

View File

@ -1,5 +1,5 @@
/*
* $Id: crtbegin.c,v 1.10 2005-03-18 12:38:22 obarthel Exp $
* $Id: crtbegin.c,v 1.11 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -27,6 +27,11 @@ static void (*__DTOR_LIST__[1]) (void) __attribute__(( used, section(".dtors"),
/****************************************************************************/
void _init(void);
void _fini(void);
/****************************************************************************/
void
_init(void)
{

View File

@ -1,5 +1,5 @@
/*
* $Id: debug.c,v 1.4 2006-01-08 12:04:22 obarthel Exp $
* $Id: debug.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=8
*
@ -160,7 +160,7 @@ _SHOWVALUE(
{
if(__debug_level >= DEBUGLEVEL_Reports)
{
char *fmt;
const char *fmt;
switch(size)
{
@ -207,7 +207,7 @@ _SHOWPOINTER(
{
if(__debug_level >= DEBUGLEVEL_Reports)
{
char *fmt;
const char *fmt;
_INDENT();

View File

@ -1,5 +1,5 @@
/*
* $Id: libgen_basename.c,v 1.4 2006-01-08 12:04:22 obarthel Exp $
* $Id: libgen_basename.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -58,7 +58,7 @@ basename(char *path)
if(path == NULL || path[0] == '\0')
{
result = ".";
result = (char *)".";
}
else
{
@ -86,7 +86,7 @@ basename(char *path)
}
else
{
result = "/";
result = (char *)"/";
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: libgen_dirname.c,v 1.4 2006-01-08 12:04:23 obarthel Exp $
* $Id: libgen_dirname.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -58,7 +58,7 @@ dirname(char *path)
if(path == NULL || path[0] == '\0')
{
result = ".";
result = (char *)".";
}
else
{
@ -71,7 +71,7 @@ dirname(char *path)
if(len > 0)
{
result = ".";
result = (char *)".";
for(i = len-1 ; i >= 0 ; i--)
{
@ -87,7 +87,7 @@ dirname(char *path)
}
else
{
result = "/";
result = (char *)"/";
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: locale_localeconv.c,v 1.5 2006-01-08 12:04:23 obarthel Exp $
* $Id: locale_localeconv.c,v 1.6 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -56,16 +56,16 @@ localeconv(void)
/* This makes up the current locale settings from the various
* components in use.
*/
loc.decimal_point = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_DecimalPoint) : ".";
loc.thousands_sep = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_GroupSeparator) : "";
loc.grouping = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_Grouping) : "";
loc.int_curr_symbol = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonIntCS) : "";
loc.currency_symbol = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonCS) : "";
loc.mon_decimal_point = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonDecimalPoint) : "";
loc.mon_thousands_sep = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonGroupSeparator) : "";
loc.mon_grouping = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonGrouping) : "";
loc.positive_sign = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonPositiveSign) : "";
loc.negative_sign = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonNegativeSign) : "";
loc.decimal_point = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_DecimalPoint) : (char *)".";
loc.thousands_sep = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_GroupSeparator) : (char *)"";
loc.grouping = (numeric_locale != NULL) ? ((char *)numeric_locale->loc_Grouping) : (char *)"";
loc.int_curr_symbol = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonIntCS) : (char *)"";
loc.currency_symbol = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonCS) : (char *)"";
loc.mon_decimal_point = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonDecimalPoint) : (char *)"";
loc.mon_thousands_sep = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonGroupSeparator) : (char *)"";
loc.mon_grouping = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonGrouping) : (char *)"";
loc.positive_sign = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonPositiveSign) : (char *)"";
loc.negative_sign = (monetary_locale != NULL) ? ((char *)monetary_locale->loc_MonNegativeSign) : (char *)"";
loc.int_frac_digits = (monetary_locale != NULL) ? monetary_locale->loc_MonIntFracDigits : CHAR_MAX;
loc.frac_digits = (monetary_locale != NULL) ? monetary_locale->loc_MonFracDigits : CHAR_MAX;
loc.p_cs_precedes = (monetary_locale != NULL) ? monetary_locale->loc_MonPositiveCSPos : CHAR_MAX;

View File

@ -1,5 +1,5 @@
/*
* $Id: math_exp.c,v 1.7 2006-09-22 07:54:24 obarthel Exp $
* $Id: math_exp.c,v 1.8 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -159,7 +159,7 @@ INLINE STATIC double
__exp(double x)
{
double y,hi=0,lo=0,c,t;
int k,xsb;
int k=0,xsb;
unsigned int hx;
GET_HIGH_WORD(hx,x);

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_filliobreadbuffer.c,v 1.11 2006-01-08 12:04:24 obarthel Exp $
* $Id: stdio_filliobreadbuffer.c,v 1.12 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -66,7 +66,7 @@ __fill_iob_read_buffer(struct iob * file)
SHOWVALUE(file->iob_BufferSize);
fam.fam_Action = file_action_read;
fam.fam_Data = file->iob_Buffer;
fam.fam_Data = (char *)file->iob_Buffer;
fam.fam_Size = file->iob_BufferSize;
assert( file->iob_Action != NULL );

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_flushiobwritebuffer.c,v 1.8 2006-01-08 12:04:24 obarthel Exp $
* $Id: stdio_flushiobwritebuffer.c,v 1.9 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -70,7 +70,7 @@ __flush_iob_write_buffer(struct iob * file)
SHOWMSG("calling the hook");
fam.fam_Action = file_action_write;
fam.fam_Data = file->iob_Buffer;
fam.fam_Data = (char *)file->iob_Buffer;
fam.fam_Size = file->iob_BufferWriteBytes;
assert( file->iob_Action != NULL );

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_initializeiob.c,v 1.5 2006-01-08 12:04:24 obarthel Exp $
* $Id: stdio_initializeiob.c,v 1.6 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -54,7 +54,7 @@ __initialize_iob(
memset(iob,0,sizeof(*iob));
iob->iob_CustomBuffer = custom_buffer;
iob->iob_Buffer = buffer;
iob->iob_Buffer = (UBYTE *)buffer;
iob->iob_BufferSize = buffer_size;
iob->iob_Descriptor = file_descriptor;
iob->iob_SlotNumber = slot_number;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_locksemaphorename.c,v 1.4 2006-01-08 12:04:24 obarthel Exp $
* $Id: stdio_locksemaphorename.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -37,4 +37,4 @@
/****************************************************************************/
char * NOCOMMON __file_lock_semaphore_name = "Advisory File Locking";
char * NOCOMMON __file_lock_semaphore_name = (char *)"Advisory File Locking";

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_setvbuf.c,v 1.9 2006-01-08 12:04:25 obarthel Exp $
* $Id: stdio_setvbuf.c,v 1.10 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -154,7 +154,7 @@ setvbuf(FILE *stream,char *buf,int bufmode,size_t size)
if(bufmode == IOBF_BUFFER_MODE_NONE)
{
/* Use the default buffer, which is one byte in size. */
new_buffer = &file->iob_SingleByte;
new_buffer = (char *)&file->iob_SingleByte;
size = 1;
}
else
@ -162,7 +162,7 @@ setvbuf(FILE *stream,char *buf,int bufmode,size_t size)
/* Replace the old buffer. */
if(buf != NULL)
{
new_buffer = (UBYTE *)buf;
new_buffer = (char *)buf;
}
else
{
@ -178,7 +178,7 @@ setvbuf(FILE *stream,char *buf,int bufmode,size_t size)
assert( file->iob_BufferReadBytes == 0 );
assert( file->iob_BufferWriteBytes == 0 );
file->iob_Buffer = new_buffer;
file->iob_Buffer = (UBYTE *)new_buffer;
file->iob_BufferSize = size;
file->iob_Flags &= ~IOBF_BUFFER_MODE;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_vfprintf.c,v 1.21 2006-01-08 12:04:25 obarthel Exp $
* $Id: stdio_vfprintf.c,v 1.22 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -1329,7 +1329,7 @@ vfprintf(FILE * stream,const char * format, va_list arg)
#if defined(NDEBUG)
{
if(output_buffer == NULL)
output_buffer = "";
output_buffer = (char *)"";
}
#else
{
@ -1504,13 +1504,13 @@ vfprintf(FILE * stream,const char * format, va_list arg)
/* Get ready to prefix a sign character, if required. */
if(FLAG_IS_SET(format_flags,FORMATF_IsNegative))
prefix = "-";
prefix = (char *)"-";
else if (FLAG_IS_SET(format_flags,FORMATF_ProduceSign))
prefix = "+";
prefix = (char *)"+";
else if (FLAG_IS_SET(format_flags,FORMATF_ProduceSpace))
prefix = " ";
prefix = (char *)" ";
else if (FLAG_IS_SET(format_flags,FORMATF_ZeroPrefix))
prefix = "0";
prefix = (char *)"0";
else
prefix = NULL;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_arg.c,v 1.13 2006-09-22 07:54:25 obarthel Exp $
* $Id: stdlib_arg.c,v 1.14 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -146,7 +146,7 @@ ARG_CONSTRUCTOR(arg_init)
/* Get the shell parameter string and find out
how long it is, stripping a trailing line
feed and blank spaces if necessary. */
arg_str = GetArgStr();
arg_str = (unsigned char *)GetArgStr();
while(is_space(*arg_str))
arg_str++;
@ -257,9 +257,9 @@ ARG_CONSTRUCTOR(arg_init)
str++;
__argv[__argc++] = str;
__argv[__argc++] = (char *)str;
arg = str;
arg = (char *)str;
/* Process the quoted string. */
while((*str) != '\0' && NOT is_final_quote_character(str))
@ -314,7 +314,7 @@ ARG_CONSTRUCTOR(arg_init)
}
else
{
__argv[__argc++] = str;
__argv[__argc++] = (char *)str;
while((*str) != '\0' && NOT is_space(*str))
str++;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_main.c,v 1.30 2006-01-08 12:04:25 obarthel Exp $
* $Id: stdlib_main.c,v 1.31 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -347,7 +347,7 @@ _main(void)
/* Try to open the libraries we need to proceed. */
if(CANNOT open_libraries())
{
char * error_message;
const char * error_message;
/* If available, use the error message provided by the client. */
error_message = __minimum_os_lib_error;

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_setenv.c,v 1.10 2006-01-08 12:04:26 obarthel Exp $
* $Id: stdlib_setenv.c,v 1.11 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -220,7 +220,7 @@ setenv(const char *original_name, const char *original_value, int overwrite)
}
if(value == NULL)
value = "";
value = (char *)"";
SHOWSTRING(name);
SHOWSTRING(value);

View File

@ -1,5 +1,5 @@
/*
* $Id: string_memcpy.c,v 1.7 2006-01-08 12:04:26 obarthel Exp $
* $Id: string_memcpy.c,v 1.8 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -312,8 +312,8 @@ __memcpy(unsigned char * to,unsigned char * from,size_t len)
len -= sizeof(long);
}
to = (char *)_to;
from = (char *)_from;
to = (unsigned char *)_to;
from = (unsigned char *)_from;
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: string_memmove.c,v 1.6 2006-01-08 12:04:26 obarthel Exp $
* $Id: string_memmove.c,v 1.7 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -447,8 +447,8 @@ __memmove(unsigned char * to,unsigned char * from,size_t len)
len -= sizeof(long);
}
to = (char *)_to;
from = (char *)_from;
to = (unsigned char *)_to;
from = (unsigned char *)_from;
}
}
@ -549,8 +549,8 @@ __memmove(unsigned char * to,unsigned char * from,size_t len)
len -= sizeof(long);
}
to = (char *)_to;
from = (char *)_from;
to = (unsigned char *)_to;
from = (unsigned char *)_from;
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: string_memset.c,v 1.7 2006-01-08 12:04:26 obarthel Exp $
* $Id: string_memset.c,v 1.8 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -116,7 +116,7 @@ __memset(unsigned char * to,unsigned char value,size_t len)
len -= sizeof(long);
}
to = (char *)_to;
to = (unsigned char *)_to;
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: systeminfo_sysinfo.c,v 1.4 2006-09-21 09:24:20 obarthel Exp $
* $Id: systeminfo_sysinfo.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -136,8 +136,8 @@ sysinfo(int cmd,char *buf,long buflen)
/* Solaris uses "ppc" as the isa name, but gcc uses powerpc. "ppc+altivec" follows the
convention of specifying isa+ext from Solaris on SPARC machines. This way of implementing
SI_ISALIST seemed like a good idea at the time. */
const char * s;
uint32 vecu;
char * s;
GetCPUInfoTags(GCIT_VectorUnit,&vecu,TAG_DONE);

View File

@ -1,5 +1,5 @@
/*
* $Id: time_asctime_r.c,v 1.8 2006-01-08 12:04:27 obarthel Exp $
* $Id: time_asctime_r.c,v 1.9 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -177,7 +177,7 @@ __asctime_r(const struct tm *tm,char * buffer,size_t buffer_size)
}
else
{
result = "";
result = (char *)"";
}
out:

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_def_path.c,v 1.2 2006-08-01 19:06:48 obarthel Exp $
* $Id: unistd_def_path.c,v 1.3 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -37,4 +37,4 @@
/****************************************************************************/
char * __default_path = "/gcc/bin:/SDK/C:/SDK/Local/C:/C:.";
char * __default_path = (char *)"/gcc/bin:/SDK/C:/SDK/Local/C:/C:.";

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_def_path_delimiter.c,v 1.2 2006-08-01 19:06:48 obarthel Exp $
* $Id: unistd_def_path_delimiter.c,v 1.3 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -37,4 +37,4 @@
/****************************************************************************/
char * __default_path_delimiter = ":";
char * __default_path_delimiter = (char *)":";

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_execvp.c,v 1.5 2006-08-02 14:44:01 obarthel Exp $
* $Id: unistd_execvp.c,v 1.6 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -161,7 +161,7 @@ execvp(const char *command,char * const argv[])
while((search_prefix = local_strsep(&path,path_delimiter)) != NULL)
{
if((*search_prefix) == '\0')
search_prefix = ".";
search_prefix = (char *)".";
search_prefix_len = strlen(search_prefix);

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_ttyname.c,v 1.3 2006-01-08 12:04:27 obarthel Exp $
* $Id: unistd_ttyname.c,v 1.4 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -136,7 +136,7 @@ ttyname(int file_descriptor)
goto out;
}
result = "CONSOLE:";
result = (char *)"CONSOLE:";
out:

View File

@ -1,5 +1,5 @@
/*
* $Id: usergroup_crypt.c,v 1.4 2006-01-08 12:04:27 obarthel Exp $
* $Id: usergroup_crypt.c,v 1.5 2006-09-22 09:02:51 obarthel Exp $
*
* :ts=4
*
@ -79,7 +79,7 @@ crypt(const char *key,const char *salt)
#endif /* CHECK_FOR_NULL_POINTERS */
PROFILE_OFF();
result = __crypt((STRPTR)key,(STRPTR)salt);
result = (char *)__crypt((STRPTR)key,(STRPTR)salt);
PROFILE_ON();
SHOWSTRING(result);