Consistent code formatting for the core code

Code formatting was quite a mess (different indentation, completely
different ideas on where opening braces should go, spacing in various
places, early out versus single return or goto-based error handling,
&c.).  This commit cleans it up.

A few doxygen comment fixes allowed turning on Clang's warnings for
doxygen comments, so those are no enabled by default as least on
Xcode-based builds.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-05-23 20:40:51 +02:00 committed by eboasson
parent 19aec98b8a
commit 13480616e0
56 changed files with 2856 additions and 4542 deletions

View file

@ -105,7 +105,6 @@ PREPEND(hdrs_private_ddsi "${CMAKE_CURRENT_LIST_DIR}/include/dds/ddsi"
q_rtps.h
q_security.h
q_sockwaitset.h
q_static_assert.h
q_thread.h
q_time.h
q_transmit.h

View file

@ -467,17 +467,6 @@ nn_vendorid_t get_entity_vendorid (const struct entity_common *e);
* - RTPS_PF_ONLY_LOCAL FIXME: not used, it seems
* @param[in] plist
* Parameters/QoS for this participant
* @param[out] dest
* Filled with the recognized parameters in the input if successful, otherwise
* initialized to an empty parameter list. Where possible, pointers alias the
* input (indicated by the "aliased" bits in the plist/xqos structures), but
* some things cannot be aliased (e.g., the array of pointers to strings for a
* sequence of strings).
* Generally, nn_plist_fini should be called when done with the parameter list,
* even when nn_plist_unlias or nn_xqos_unlias hasn't been called.
* @param[out] nextafterplist
* If non-NULL, *nextafterplist is set to the first byte following the parameter
* list sentinel on successful parse, or to NULL on failure
*
* @returns A dds_return_t indicating success or failure.
*
@ -562,11 +551,11 @@ int writer_must_have_hb_scheduled (const struct writer *wr, const struct whc_sta
void writer_set_retransmitting (struct writer *wr);
void writer_clear_retransmitting (struct writer *wr);
int delete_writer (const struct nn_guid *guid);
int delete_writer_nolinger (const struct nn_guid *guid);
int delete_writer_nolinger_locked (struct writer *wr);
dds_return_t delete_writer (const struct nn_guid *guid);
dds_return_t delete_writer_nolinger (const struct nn_guid *guid);
dds_return_t delete_writer_nolinger_locked (struct writer *wr);
int delete_reader (const struct nn_guid *guid);
dds_return_t delete_reader (const struct nn_guid *guid);
uint64_t reader_instance_id (const struct nn_guid *guid);
struct local_orphan_writer {

View file

@ -18,9 +18,7 @@ extern "C" {
struct nn_xqos;
int partition_match_based_on_wildcard_in_left_operand (const struct nn_xqos *a, const struct nn_xqos *b, const char **realname);
int partitions_match_p (const struct nn_xqos *a, const struct nn_xqos *b);
int is_wildcard_partition (const char *str);
/* Returns -1 on success, or QoS id of first mismatch (>=0) */

View file

@ -1,37 +0,0 @@
/*
* Copyright(c) 2006 to 2018 ADLINK Technology Limited and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
* v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
#ifndef Q_STATIC_ASSERT_H
#define Q_STATIC_ASSERT_H
/* There are many tricks to use a constant expression to yield an
illegal type or expression at compile time, such as zero-sized
arrays and duplicate case or enum labels. So this is but one of the
many tricks. */
#ifndef _MSC_VER
#define Q_STATIC_ASSERT_CODE(pred) do { switch(0) { case 0: case pred: ; } } while (0)
#else
/* Temporarily disabling warning C6326: Potential comparison of a
constant with another constant. */
#define Q_STATIC_ASSERT_CODE(pred) do { \
__pragma (warning (push)) \
__pragma (warning (disable : 6326)) \
switch(0) { case 0: case pred: ; } \
__pragma (warning (pop)) \
} while (0)
#endif
#endif /* Q_STATIC_ASSERT_H */

View file

@ -17,7 +17,7 @@
#include "dds/ddsrt/atomics.h"
#include "dds/ddsrt/sync.h"
#include "dds/ddsrt/threads.h"
#include "dds/ddsi/q_static_assert.h"
#include "dds/ddsrt/static_assert.h"
#if defined (__cplusplus)
extern "C" {
@ -125,7 +125,7 @@ DDS_EXPORT inline bool vtime_asleep_p (vtime_t vtime)
DDS_EXPORT inline bool vtime_gt (vtime_t vtime1, vtime_t vtime0)
{
Q_STATIC_ASSERT_CODE (sizeof (vtime_t) == sizeof (svtime_t));
DDSRT_STATIC_ASSERT_CODE (sizeof (vtime_t) == sizeof (svtime_t));
return (svtime_t) ((vtime1 & VTIME_TIME_MASK) - (vtime0 & VTIME_TIME_MASK)) > 0;
}

View file

@ -332,8 +332,9 @@ static enum ddsi_locator_from_string_result ddsi_raweth_address_from_string (dds
memset (loc->address, 0, sizeof (loc->address));
while (i < 6 && *str != 0)
{
int o, p;
if (sscanf (str, "%x%n", &o, &p) != 1 || o < 0 || o > 255)
unsigned o;
int p;
if (sscanf (str, "%x%n", &o, &p) != 1 || o > 255)
return AFSR_INVALID;
loc->address[10 + i++] = (unsigned char) o;
str += p;

View file

@ -127,12 +127,12 @@ static int add_addresses_to_addrset_1 (struct addrset *as, const char *ip, int p
return 0;
}
DDSRT_WARNING_MSVC_OFF(4996);
int add_addresses_to_addrset (struct addrset *as, const char *addrs, int port_mode, const char *msgtag, int req_mc)
{
/* port_mode: -1 => take from string, if 0 & unicast, add for a range of participant indices;
port_mode >= 0 => always set port to port_mode
*/
DDSRT_WARNING_MSVC_OFF(4996);
char *addrs_copy, *ip, *cursor, *a;
int retval = -1;
addrs_copy = ddsrt_strdup (addrs);
@ -179,8 +179,8 @@ int add_addresses_to_addrset (struct addrset *as, const char *addrs, int port_mo
ddsrt_free (ip);
ddsrt_free (addrs_copy);
return retval;
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
int compare_locators (const nn_locator_t *a, const nn_locator_t *b)
{

View file

@ -1335,9 +1335,9 @@ static void do_print_uint32_bitset (struct cfgst *cfgst, uint32_t mask, size_t n
cfg_logelem (cfgst, sources, "%s%s", res, suffix);
}
DDSRT_WARNING_MSVC_OFF(4996);
static int uf_natint64_unit(struct cfgst *cfgst, int64_t *elem, const char *value, const struct unit *unittab, int64_t def_mult, int64_t min, int64_t max)
{
DDSRT_WARNING_MSVC_OFF(4996);
int pos;
double v_dbl;
int64_t v_int;
@ -1364,8 +1364,8 @@ static int uf_natint64_unit(struct cfgst *cfgst, int64_t *elem, const char *valu
*elem = 0; /* some static analyzers don't "get it" */
return cfg_error (cfgst, "%s: invalid value", value);
}
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
static void pf_int64_unit (struct cfgst *cfgst, int64_t value, uint32_t sources, const struct unit *unittab, const char *zero_unit)
{
@ -1393,10 +1393,8 @@ static void pf_int64_unit (struct cfgst *cfgst, int64_t value, uint32_t sources,
}
#define GENERIC_ENUM_CTYPE_UF(type_, c_type_) \
struct en_##type_##_vs_ms_check { \
char length_eq[(sizeof (en_##type_##_vs) / sizeof (*en_##type_##_vs) == \
sizeof (en_##type_##_ms) / sizeof (*en_##type_##_ms)) ? 1 : -1]; \
}; \
DDSRT_STATIC_ASSERT (sizeof (en_##type_##_vs) / sizeof (*en_##type_##_vs) == \
sizeof (en_##type_##_ms) / sizeof (*en_##type_##_ms)); \
\
static int uf_##type_ (struct cfgst *cfgst, void *parent, UNUSED_ARG (struct cfgelem const * const cfgelem), UNUSED_ARG (int first), const char *value) \
{ \
@ -1773,9 +1771,9 @@ static void pf_allow_multicast(struct cfgst *cfgst, void *parent, struct cfgelem
do_print_uint32_bitset (cfgst, *p, sizeof (allow_multicast_codes) / sizeof (*allow_multicast_codes), allow_multicast_names, allow_multicast_codes, sources, "");
}
DDSRT_WARNING_MSVC_OFF(4996);
static int uf_maybe_int32 (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG (int first), const char *value)
{
DDSRT_WARNING_MSVC_OFF(4996);
struct config_maybe_int32 * const elem = cfg_address (cfgst, parent, cfgelem);
int pos;
if (ddsrt_strcasecmp (value, "default") == 0) {
@ -1788,8 +1786,8 @@ static int uf_maybe_int32 (struct cfgst *cfgst, void *parent, struct cfgelem con
} else {
return cfg_error (cfgst, "'%s': neither 'default' nor a decimal integer\n", value);
}
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
static void pf_maybe_int32 (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, uint32_t sources)
{
@ -1940,9 +1938,9 @@ static void pf_duration (struct cfgst *cfgst, void *parent, struct cfgelem const
pf_int64_unit (cfgst, *elem, sources, unittab_duration, "s");
}
DDSRT_WARNING_MSVC_OFF(4996);
static int uf_domainId (struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, UNUSED_ARG (int first), const char *value)
{
DDSRT_WARNING_MSVC_OFF(4996);
struct config_maybe_int32 * const elem = cfg_address (cfgst, parent, cfgelem);
int pos;
if (ddsrt_strcasecmp (value, "any") == 0) {
@ -1955,8 +1953,8 @@ static int uf_domainId (struct cfgst *cfgst, void *parent, struct cfgelem const
} else {
return cfg_error (cfgst, "'%s': neither 'any' nor a decimal integer in 0 .. 230\n", value);
}
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
static void pf_domainId(struct cfgst *cfgst, void *parent, struct cfgelem const * const cfgelem, uint32_t sources)
{

View file

@ -1099,10 +1099,10 @@ static void rebuild_make_locs_nrds(int **locs_nrds, int nreaders, int nlocs, con
if (covered[j * nlocs + i] >= 0)
n++;
/* The compiler doesn't realize that ln is large enough. */
DDSRT_WARNING_MSVC_OFF(6386);
/* The compiler doesn't realize that ln is large enough. */
DDSRT_WARNING_MSVC_OFF(6386);
ln[i] = n;
DDSRT_WARNING_MSVC_ON(6386);
DDSRT_WARNING_MSVC_ON(6386);
}
*locs_nrds = ln;
}
@ -3002,7 +3002,7 @@ static void writer_set_state (struct writer *wr, enum writer_state newstate)
wr->state = newstate;
}
int delete_writer_nolinger_locked (struct writer *wr)
dds_return_t delete_writer_nolinger_locked (struct writer *wr)
{
DDS_LOG(DDS_LC_DISCOVERY, "delete_writer_nolinger(guid "PGUIDFMT") ...\n", PGUID (wr->e.guid));
ASSERT_MUTEX_HELD (&wr->e.lock);
@ -3014,7 +3014,7 @@ int delete_writer_nolinger_locked (struct writer *wr)
return 0;
}
int delete_writer_nolinger (const struct nn_guid *guid)
dds_return_t delete_writer_nolinger (const struct nn_guid *guid)
{
struct writer *wr;
/* We take no care to ensure application writers are not deleted
@ -3043,7 +3043,7 @@ void delete_local_orphan_writer (struct local_orphan_writer *lowr)
ddsrt_mutex_unlock (&lowr->wr.e.lock);
}
int delete_writer (const struct nn_guid *guid)
dds_return_t delete_writer (const struct nn_guid *guid)
{
struct writer *wr;
struct whc_state whcst;
@ -3409,7 +3409,7 @@ static void gc_delete_reader (struct gcreq *gcreq)
ddsrt_free (rd);
}
int delete_reader (const struct nn_guid *guid)
dds_return_t delete_reader (const struct nn_guid *guid)
{
struct reader *rd;
assert (!is_writer_entityid (guid->entityid));

View file

@ -140,9 +140,9 @@ void nn_freelist_fini (struct nn_freelist *fl, void (*xfree) (void *))
xfree (fl->inner[i].m->x[j]);
ddsrt_free(fl->inner[i].m);
}
/* The compiler can't make sense of all these linked lists and doesn't
* realize that the next pointers are always initialized here. */
DDSRT_WARNING_MSVC_OFF(6001);
/* The compiler can't make sense of all these linked lists and doesn't
* realize that the next pointers are always initialized here. */
DDSRT_WARNING_MSVC_OFF(6001);
while ((m = fl->mlist) != NULL)
{
fl->mlist = m->next;
@ -155,7 +155,7 @@ DDSRT_WARNING_MSVC_OFF(6001);
fl->emlist = m->next;
ddsrt_free (m);
}
DDSRT_WARNING_MSVC_ON(6001);
DDSRT_WARNING_MSVC_ON(6001);
}
static ddsrt_atomic_uint32_t freelist_inner_idx_off = DDSRT_ATOMIC_UINT32_INIT(0);

View file

@ -415,43 +415,43 @@ static int check_thread_properties (void)
return ok;
}
DDSRT_WARNING_MSVC_OFF(4996);
int rtps_config_open (void)
{
int status;
DDSRT_WARNING_MSVC_OFF(4996);
int status;
if (config.tracingOutputFileName == NULL || *config.tracingOutputFileName == 0 || config.enabled_logcats == 0)
{
config.enabled_logcats = 0;
config.tracingOutputFile = NULL;
status = 1;
}
else if (ddsrt_strcasecmp (config.tracingOutputFileName, "stdout") == 0)
{
config.tracingOutputFile = stdout;
status = 1;
}
else if (ddsrt_strcasecmp (config.tracingOutputFileName, "stderr") == 0)
{
config.tracingOutputFile = stderr;
status = 1;
}
else if ((config.tracingOutputFile = fopen (config.tracingOutputFileName, config.tracingAppendToFile ? "a" : "w")) == NULL)
{
DDS_ERROR("%s: cannot open for writing\n", config.tracingOutputFileName);
status = 0;
}
else
{
status = 1;
}
if (config.tracingOutputFileName == NULL || *config.tracingOutputFileName == 0 || config.enabled_logcats == 0)
{
config.enabled_logcats = 0;
config.tracingOutputFile = NULL;
status = 1;
}
else if (ddsrt_strcasecmp (config.tracingOutputFileName, "stdout") == 0)
{
config.tracingOutputFile = stdout;
status = 1;
}
else if (ddsrt_strcasecmp (config.tracingOutputFileName, "stderr") == 0)
{
config.tracingOutputFile = stderr;
status = 1;
}
else if ((config.tracingOutputFile = fopen (config.tracingOutputFileName, config.tracingAppendToFile ? "a" : "w")) == NULL)
{
DDS_ERROR("%s: cannot open for writing\n", config.tracingOutputFileName);
status = 0;
}
else
{
status = 1;
}
dds_set_log_mask(config.enabled_logcats);
dds_set_trace_file(config.tracingOutputFile);
dds_set_log_mask(config.enabled_logcats);
dds_set_trace_file(config.tracingOutputFile);
return status;
return status;
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
int rtps_config_prep (struct cfgst *cfgst)
{
@ -1654,10 +1654,10 @@ void rtps_fini (void)
while (gv.recvips)
{
struct config_in_addr_node *n = gv.recvips;
/* The compiler doesn't realize that n->next is always initialized. */
DDSRT_WARNING_MSVC_OFF(6001);
/* The compiler doesn't realize that n->next is always initialized. */
DDSRT_WARNING_MSVC_OFF(6001);
gv.recvips = n->next;
DDSRT_WARNING_MSVC_ON(6001);
DDSRT_WARNING_MSVC_ON(6001);
ddsrt_free (n);
}

View file

@ -77,9 +77,9 @@ static const ipv4_hdr_t ipv4_hdr_template = {
#define IPV4_HDR_SIZE 20
#define UDP_HDR_SIZE 8
DDSRT_WARNING_MSVC_OFF(4996);
FILE *new_pcap_file (const char *name)
{
DDSRT_WARNING_MSVC_OFF(4996);
FILE *fp;
pcap_hdr_t hdr;
@ -99,8 +99,8 @@ FILE *new_pcap_file (const char *name)
fwrite (&hdr, sizeof (hdr), 1, fp);
return fp;
DDSRT_WARNING_MSVC_ON(4996);
}
DDSRT_WARNING_MSVC_ON(4996);
static void write_data (FILE *fp, const ddsrt_msghdr_t *msghdr, size_t sz)
{

View file

@ -17,6 +17,7 @@
#include "dds/ddsrt/log.h"
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/static_assert.h"
#include "dds/ddsi/q_log.h"
@ -30,7 +31,6 @@
#include "dds/ddsi/q_globals.h"
#include "dds/ddsi/q_protocol.h" /* for NN_STATUSINFO_... */
#include "dds/ddsi/q_radmin.h" /* for nn_plist_quickscan */
#include "dds/ddsi/q_static_assert.h"
#include "dds/ddsrt/avl.h"
#include "dds/ddsi/q_misc.h" /* for vendor_is_... */
@ -407,8 +407,8 @@ void nn_plist_fini (nn_plist_t *ps)
int i;
nn_xqos_fini (&ps->qos);
/* The compiler doesn't understand how offsetof is used in the arrays. */
DDSRT_WARNING_MSVC_OFF(6001);
/* The compiler doesn't understand how offsetof is used in the arrays. */
DDSRT_WARNING_MSVC_OFF(6001);
for (i = 0; i < (int) (sizeof (simple) / sizeof (*simple)); i++)
{
if ((ps->present & simple[i].fl) && !(ps->aliased & simple[i].fl))
@ -422,7 +422,7 @@ DDSRT_WARNING_MSVC_OFF(6001);
if ((ps->present & locs[i].fl) && !(ps->aliased & locs[i].fl))
free_locators ((nn_locators_t *) ((char *) ps + locs[i].off));
}
DDSRT_WARNING_MSVC_ON(6001);
DDSRT_WARNING_MSVC_ON(6001);
ps->present = 0;
}
@ -1943,7 +1943,7 @@ static dds_return_t init_one_parameter
if (dd->bufsz >= 2 * sizeof (dest->statusinfo) && vendor_is_eclipse_or_opensplice(dd->vendorid))
{
uint32_t statusinfox;
Q_STATIC_ASSERT_CODE (sizeof(statusinfox) == sizeof(dest->statusinfo));
DDSRT_STATIC_ASSERT_CODE (sizeof(statusinfox) == sizeof(dest->statusinfo));
memcpy (&statusinfox, dd->buf + sizeof (dest->statusinfo), sizeof (statusinfox));
statusinfox = fromBE4u (statusinfox);
if (statusinfox & NN_STATUSINFOX_OSPL_AUTO)

View file

@ -17,7 +17,7 @@
#include "dds/ddsi/q_misc.h"
#include "dds/ddsi/q_qosmatch.h"
int is_wildcard_partition (const char *str)
static int is_wildcard_partition (const char *str)
{
return strchr (str, '*') || strchr (str, '?');
}
@ -66,46 +66,6 @@ int partitions_match_p (const nn_xqos_t *a, const nn_xqos_t *b)
}
}
int partition_match_based_on_wildcard_in_left_operand (const nn_xqos_t *a, const nn_xqos_t *b, const char **realname)
{
assert (partitions_match_p (a, b));
if (!(a->present & QP_PARTITION) || a->partition.n == 0)
{
return 0;
}
else if (!(b->present & QP_PARTITION) || b->partition.n == 0)
{
/* Either A explicitly includes the default partition, or it is a
wildcard that matches it */
unsigned i;
for (i = 0; i < a->partition.n; i++)
if (strcmp (a->partition.strs[i], "") == 0)
return 0;
*realname = "";
return 1;
}
else
{
unsigned i, j;
int maybe_yes = 0;
for (i = 0; i < a->partition.n; i++)
for (j = 0; j < b->partition.n; j++)
{
if (partition_patmatch_p (a->partition.strs[i], b->partition.strs[j]))
{
if (!is_wildcard_partition (a->partition.strs[i]))
return 0;
else
{
*realname = b->partition.strs[j];
maybe_yes = 1;
}
}
}
return maybe_yes;
}
}
static int ddsi_duration_is_lt (nn_duration_t a0, nn_duration_t b0)
{
/* inf counts as <= inf */

View file

@ -19,6 +19,7 @@
#include "dds/ddsrt/md5.h"
#include "dds/ddsrt/sync.h"
#include "dds/ddsrt/string.h"
#include "dds/ddsrt/static_assert.h"
#include "dds/ddsrt/avl.h"
#include "dds__stream.h"
@ -46,7 +47,6 @@
#include "dds/ddsi/q_transmit.h"
#include "dds/ddsi/q_globals.h"
#include "dds/ddsi/q_static_assert.h"
#include "dds/ddsi/q_init.h"
#include "dds/ddsi/ddsi_tkmap.h"
#include "dds/ddsi/ddsi_mcgroup.h"
@ -1613,7 +1613,7 @@ static int handle_one_gap (struct proxy_writer *pwr, struct pwr_rd_match *wn, se
anything useful, or there was insufficient memory to store it.
When the result is either ACCEPT or a sample chain, it clearly
meant something. */
Q_STATIC_ASSERT_CODE (NN_REORDER_ACCEPT == 0);
DDSRT_STATIC_ASSERT_CODE (NN_REORDER_ACCEPT == 0);
if (res >= 0)
gap_was_valuable = 1;
@ -1877,7 +1877,7 @@ unsigned char normalize_data_datafrag_flags (const SubmessageHeader_t *smhdr)
case SMID_DATA_FRAG:
{
unsigned char common = smhdr->flags & DATA_FLAG_INLINE_QOS;
Q_STATIC_ASSERT_CODE (DATA_FLAG_INLINE_QOS == DATAFRAG_FLAG_INLINE_QOS);
DDSRT_STATIC_ASSERT_CODE (DATA_FLAG_INLINE_QOS == DATAFRAG_FLAG_INLINE_QOS);
if (smhdr->flags & DATAFRAG_FLAG_KEYFLAG)
return common | DATA_FLAG_KEYFLAG;
else

View file

@ -89,15 +89,15 @@ void thread_states_init (unsigned maxthreads)
thread_states.ts =
ddsrt_malloc_aligned_cacheline (maxthreads * sizeof (*thread_states.ts));
memset (thread_states.ts, 0, maxthreads * sizeof (*thread_states.ts));
/* The compiler doesn't realize that ts is large enough. */
DDSRT_WARNING_MSVC_OFF(6386);
/* The compiler doesn't realize that ts is large enough. */
DDSRT_WARNING_MSVC_OFF(6386);
for (i = 0; i < thread_states.nthreads; i++)
{
thread_states.ts[i].state = THREAD_STATE_ZERO;
thread_states.ts[i].vtime = 0u;
thread_states.ts[i].name = NULL;
}
DDSRT_WARNING_MSVC_ON(6386);
DDSRT_WARNING_MSVC_ON(6386);
}
void thread_states_fini (void)

View file

@ -14,6 +14,7 @@
#include "dds/ddsrt/heap.h"
#include "dds/ddsrt/sync.h"
#include "dds/ddsrt/static_assert.h"
#include "dds/ddsrt/avl.h"
#include "dds/ddsi/q_entity.h"
@ -30,7 +31,6 @@
#include "dds/ddsi/q_entity.h"
#include "dds/ddsi/q_unused.h"
#include "dds/ddsi/q_hbcontrol.h"
#include "dds/ddsi/q_static_assert.h"
#include "dds/ddsi/ddsi_tkmap.h"
#include "dds/ddsi/ddsi_serdata.h"
#include "dds/ddsi/ddsi_sertopic.h"
@ -598,7 +598,7 @@ dds_return_t create_fragment_message (struct writer *wr, seqno_t seq, const stru
if (xmsg_kind == NN_XMSG_KIND_DATA_REXMIT)
nn_xmsg_set_data_readerId (*pmsg, &ddcmn->readerId);
Q_STATIC_ASSERT_CODE (DATA_FLAG_INLINE_QOS == DATAFRAG_FLAG_INLINE_QOS);
DDSRT_STATIC_ASSERT_CODE (DATA_FLAG_INLINE_QOS == DATAFRAG_FLAG_INLINE_QOS);
assert (!(ddcmn->smhdr.flags & DATAFRAG_FLAG_INLINE_QOS));
if (fragnum == 0)