1
1
* Remove some set-but-not-used variables
 * Make a convenience function return void (we weren't using the
   return code, anyway)
 * Mark a function as inline (it was supposed to be inline anyway)

Reviewed by Dave Goodell.

cmr=v1.7.5:reviewer=ompi-rm1.7:subject=Fix usnic BTL compiler warnings

This commit was SVN r30160.
Этот коммит содержится в:
Jeff Squyres 2014-01-08 16:57:14 +00:00
родитель d5647394d8
Коммит 8c871c2db6
2 изменённых файлов: 7 добавлений и 16 удалений

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

@ -365,7 +365,6 @@ prepare_src_small(
ompi_btl_usnic_send_frag_t *frag;
ompi_btl_usnic_small_send_frag_t *sfrag;
size_t payload_len;
int rc;
payload_len = *size + reserve;
assert(payload_len <= module->max_frag_payload); /* precondition */
@ -399,7 +398,7 @@ prepare_src_small(
if (OPAL_UNLIKELY(opal_convertor_need_buffers(convertor))) {
/* put user data just after end of 1st seg (upper layer header) */
assert(payload_len <= module->max_frag_payload);
rc = usnic_convertor_pack_simple(
usnic_convertor_pack_simple(
convertor,
(IOVBASE_TYPE*)(frag->sf_base.uf_src_seg[0].seg_addr.lval + reserve),
*size,
@ -439,14 +438,11 @@ pack_chunk_seg_from_frag(
size_t copylen;
size_t seg_space;
size_t max_data;
mca_btl_base_descriptor_t *desc;
assert(NULL != lfrag);
/* never should be attempting to pack if we've already packed everything */
assert(lfrag->lsf_pack_bytes_left > 0);
desc = &lfrag->lsf_base.sf_base.uf_base;
seg = ompi_btl_usnic_chunk_segment_alloc(module);
if (OPAL_UNLIKELY(NULL == seg)) {
/* TODO look at ways to deal with this case more gracefully, possibly as
@ -1019,11 +1015,8 @@ usnic_handle_large_send(
ompi_btl_usnic_large_send_frag_t *lfrag;
ompi_btl_usnic_btl_chunk_header_t *chp;
ompi_btl_usnic_send_segment_t *sseg;
mca_btl_base_descriptor_t *desc;
size_t payload_len;
desc = &frag->sf_base.uf_base;
assert(frag->sf_base.uf_type == OMPI_BTL_USNIC_FRAG_LARGE_SEND);
lfrag = (ompi_btl_usnic_large_send_frag_t *)frag;
if (lfrag->lsf_cur_offset == 0) {

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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -16,15 +16,16 @@
#include "btl_usnic_module.h"
/* avoid "defined but not used" warnings */
static int __opal_attribute_always_inline__ usnic_fls(int x)
static inline int __opal_attribute_always_inline__ usnic_fls(int x)
__opal_attribute_unused__;
static int __opal_attribute_always_inline__ usnic_fls(int x)
static inline int __opal_attribute_always_inline__ usnic_fls(int x)
{
int r = 32;
if (!x)
if (!x) {
return 0;
}
if (!(x & 0xffff0000u)) {
x <<= 16;
r -= 16;
@ -48,8 +49,7 @@ static int __opal_attribute_always_inline__ usnic_fls(int x)
}
/* a helper function that just declutters convertor packing */
static inline
int
static inline void
usnic_convertor_pack_simple(
opal_convertor_t *convertor,
void *dest,
@ -69,8 +69,6 @@ usnic_convertor_pack_simple(
BTL_ERROR(("opal_convertor_pack error"));
abort(); /* XXX */
}
return OMPI_SUCCESS;
}
/*