1
1

s/char */const char*/ as it's really more appropriate in some places,

and some compilers complain about it.

This commit was SVN r5061.
Этот коммит содержится в:
Jeff Squyres 2005-03-28 14:49:06 +00:00
родитель e6bf5aa6db
Коммит 25c2da6f7a
4 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -90,7 +90,7 @@ void ompi_malloc_finalize(void)
/*
* Debug version of malloc
*/
void *ompi_malloc(size_t size, char *file, int line)
void *ompi_malloc(size_t size, const char *file, int line)
{
void *addr;
if (ompi_malloc_debug_level > 1) {
@ -115,7 +115,7 @@ void *ompi_malloc(size_t size, char *file, int line)
/*
* Debug version of calloc
*/
void *ompi_calloc(size_t nmembers, size_t size, char *file, int line)
void *ompi_calloc(size_t nmembers, size_t size, const char *file, int line)
{
void *addr;
if (ompi_malloc_debug_level > 1) {
@ -141,7 +141,7 @@ void *ompi_calloc(size_t nmembers, size_t size, char *file, int line)
/*
* Debug version of realloc
*/
void *ompi_realloc(void *ptr, size_t size, char *file, int line)
void *ompi_realloc(void *ptr, size_t size, const char *file, int line)
{
void *addr;
@ -173,7 +173,7 @@ void *ompi_realloc(void *ptr, size_t size, char *file, int line)
/*
* Debug version of free
*/
void ompi_free(void *addr, char *file, int line)
void ompi_free(void *addr, const char *file, int line)
{
if (ompi_malloc_debug_level > 1 && NULL == addr) {
ompi_output(ompi_malloc_output, "Invalid free (%s, %d)", file, line);

Просмотреть файл

@ -80,7 +80,7 @@ void ompi_malloc_finalize(void);
* This function is only used when --enable-mem-debug was specified to
* configure (or by default if you're building in a SVN checkout).
*/
void *ompi_malloc(size_t size, char *file, int line);
void *ompi_malloc(size_t size, const char *file, int line);
/**
* \internal
@ -96,7 +96,7 @@ void *ompi_malloc(size_t size, char *file, int line);
* This function is only used when --enable-mem-debug was specified to
* configure (or by default if you're building in a SVN checkout).
*/
void *ompi_calloc(size_t nmembers, size_t size, char *file, int line);
void *ompi_calloc(size_t nmembers, size_t size, const char *file, int line);
/**
* \internal
@ -112,7 +112,7 @@ void *ompi_calloc(size_t nmembers, size_t size, char *file, int line);
* This function is only used when --enable-mem-debug was specified to
* configure (or by default if you're building in a SVN checkout).
*/
void *ompi_realloc(void *ptr, size_t size, char *file, int line);
void *ompi_realloc(void *ptr, size_t size, const char *file, int line);
/**
* \internal
@ -128,7 +128,7 @@ void *ompi_realloc(void *ptr, size_t size, char *file, int line);
* to configure (or by default if you're building in a SVN
* checkout).
*/
void ompi_free(void *addr, char *file, int line);
void ompi_free(void *addr, const char *file, int line);
OMPI_DECLSPEC extern int ompi_malloc_debug_level;
OMPI_DECLSPEC extern int ompi_malloc_output;

Просмотреть файл

@ -62,7 +62,7 @@ static ompi_output_stream_t verbose = {
static int do_open(int output_id, ompi_output_stream_t *lds);
static int open_file(int i);
static void free_descriptor(int output_id);
static void output(int output_id, char *format, va_list arglist);
static void output(int output_id, const char *format, va_list arglist);
/*
@ -272,7 +272,7 @@ void ompi_output_close(int output_id)
/*
* Main function to send output to a stream
*/
void ompi_output(int output_id, char *format, ...)
void ompi_output(int output_id, const char *format, ...)
{
va_list arglist;
va_start(arglist, format);
@ -284,7 +284,7 @@ void ompi_output(int output_id, char *format, ...)
/*
* Send a message to a stream if the verbose level is high enough
*/
void ompi_output_verbose(int level, int output_id, char *format, ...)
void ompi_output_verbose(int level, int output_id, const char *format, ...)
{
if (info[output_id].ldi_verbose_level >= level) {
va_list arglist;
@ -516,7 +516,7 @@ static void free_descriptor(int output_id)
* multiple different places, even functions that took "..." as input
* arguments.
*/
static void output(int output_id, char *format, va_list arglist)
static void output(int output_id, const char *format, va_list arglist)
{
size_t len, total_len;
bool want_newline = false;

Просмотреть файл

@ -330,7 +330,7 @@ OMPI_DECLSPEC void ompi_output_close(int output_id);
* created, ompi_output() will automatically create the file and
* writing to it.
*/
OMPI_DECLSPEC void ompi_output(int output_id, char *format, ...);
OMPI_DECLSPEC void ompi_output(int output_id, const char *format, ...);
/**
* Send output to a stream only if the passed verbosity level is
@ -361,7 +361,7 @@ OMPI_DECLSPEC void ompi_output(int output_id, char *format, ...);
* @see ompi_output_set_verbosity()
*/
OMPI_DECLSPEC void ompi_output_verbose(int verbose_level, int output_id,
char *format, ...);
const char *format, ...);
/**
* Set the verbosity level for a stream.