enable printf format checking for dds_log
Also remove superfluous parameters in a TRACE statement and fix a format specification in pong.c. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
c3dca32a2f
commit
c92820677d
3 changed files with 5 additions and 3 deletions
|
@ -1747,7 +1747,7 @@ static int handle_Gap (struct receiver_state *rst, nn_etime_t tnow, struct nn_rm
|
||||||
|
|
||||||
if (!pwr->have_seen_heartbeat && pwr->n_reliable_readers > 0)
|
if (!pwr->have_seen_heartbeat && pwr->n_reliable_readers > 0)
|
||||||
{
|
{
|
||||||
DDS_TRACE(": no heartbeat seen yet", PGUID (pwr->e.guid), PGUID (dst));
|
DDS_TRACE(": no heartbeat seen yet");
|
||||||
ddsrt_mutex_unlock (&pwr->e.lock);
|
ddsrt_mutex_unlock (&pwr->e.lock);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "dds/export.h"
|
#include "dds/export.h"
|
||||||
|
#include "dds/ddsrt/attributes.h"
|
||||||
|
|
||||||
#if defined (__cplusplus)
|
#if defined (__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -199,7 +200,8 @@ dds_log(
|
||||||
uint32_t line,
|
uint32_t line,
|
||||||
const char *func,
|
const char *func,
|
||||||
const char *fmt,
|
const char *fmt,
|
||||||
...);
|
...)
|
||||||
|
ddsrt_attribute_format((__printf__, 5, 6));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Undecorated function name of the current function.
|
* @brief Undecorated function name of the current function.
|
||||||
|
|
|
@ -60,7 +60,7 @@ static void data_available(dds_entity_t rd, void *arg)
|
||||||
RoundTripModule_DataType * valid_sample = &data[j];
|
RoundTripModule_DataType * valid_sample = &data[j];
|
||||||
status = dds_write_ts (writer, valid_sample, info[j].source_timestamp);
|
status = dds_write_ts (writer, valid_sample, info[j].source_timestamp);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
DDS_FATAL("dds_write_ts: %s\n", -status);
|
DDS_FATAL("dds_write_ts: %d\n", -status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue