s/char */const char*/ as it's really more appropriate in some places,
and some compilers complain about it. This commit was SVN r5061.
Этот коммит содержится в:
родитель
e6bf5aa6db
Коммит
25c2da6f7a
@ -90,7 +90,7 @@ void ompi_malloc_finalize(void)
|
|||||||
/*
|
/*
|
||||||
* Debug version of malloc
|
* 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;
|
void *addr;
|
||||||
if (ompi_malloc_debug_level > 1) {
|
if (ompi_malloc_debug_level > 1) {
|
||||||
@ -115,7 +115,7 @@ void *ompi_malloc(size_t size, char *file, int line)
|
|||||||
/*
|
/*
|
||||||
* Debug version of calloc
|
* 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;
|
void *addr;
|
||||||
if (ompi_malloc_debug_level > 1) {
|
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
|
* 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;
|
void *addr;
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ void *ompi_realloc(void *ptr, size_t size, char *file, int line)
|
|||||||
/*
|
/*
|
||||||
* Debug version of free
|
* 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) {
|
if (ompi_malloc_debug_level > 1 && NULL == addr) {
|
||||||
ompi_output(ompi_malloc_output, "Invalid free (%s, %d)", file, line);
|
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
|
* This function is only used when --enable-mem-debug was specified to
|
||||||
* configure (or by default if you're building in a SVN checkout).
|
* 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
|
* \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
|
* This function is only used when --enable-mem-debug was specified to
|
||||||
* configure (or by default if you're building in a SVN checkout).
|
* 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
|
* \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
|
* This function is only used when --enable-mem-debug was specified to
|
||||||
* configure (or by default if you're building in a SVN checkout).
|
* 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
|
* \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
|
* to configure (or by default if you're building in a SVN
|
||||||
* checkout).
|
* 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_debug_level;
|
||||||
OMPI_DECLSPEC extern int ompi_malloc_output;
|
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 do_open(int output_id, ompi_output_stream_t *lds);
|
||||||
static int open_file(int i);
|
static int open_file(int i);
|
||||||
static void free_descriptor(int output_id);
|
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
|
* 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_list arglist;
|
||||||
va_start(arglist, format);
|
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
|
* 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) {
|
if (info[output_id].ldi_verbose_level >= level) {
|
||||||
va_list arglist;
|
va_list arglist;
|
||||||
@ -516,7 +516,7 @@ static void free_descriptor(int output_id)
|
|||||||
* multiple different places, even functions that took "..." as input
|
* multiple different places, even functions that took "..." as input
|
||||||
* arguments.
|
* 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;
|
size_t len, total_len;
|
||||||
bool want_newline = false;
|
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
|
* created, ompi_output() will automatically create the file and
|
||||||
* writing to it.
|
* 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
|
* 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()
|
* @see ompi_output_set_verbosity()
|
||||||
*/
|
*/
|
||||||
OMPI_DECLSPEC void ompi_output_verbose(int verbose_level, int output_id,
|
OMPI_DECLSPEC void ompi_output_verbose(int verbose_level, int output_id,
|
||||||
char *format, ...);
|
const char *format, ...);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the verbosity level for a stream.
|
* Set the verbosity level for a stream.
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user