Skip to content

Commit

Permalink
netdev/802154: suppress cppcheck warnings in 802154.h
Browse files Browse the repository at this point in the history
Suppress cppcheck warnings of class unusedStructMember because
this interface is not used yet. Remove these comments once it
is used.
  • Loading branch information
thomaseichinger committed Oct 30, 2014
1 parent 4c112c6 commit 02869ed
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions drivers/include/netdev/802154.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,25 +139,33 @@ typedef struct {
/**
* @see netdev_driver_t::init
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*init)(netdev_t *dev);

/**
* @details wraps netdev_802154_driver_t::send with
*
* @see netdev_driver_t::send_data
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*send_data)(netdev_t *dev, void *dest, size_t dest_len,
netdev_hlist_t *upper_layer_hdrs, void *data,
size_t data_len);

/**
* @see netdev_driver_t::add_receive_data_callback
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*add_receive_data_callback)(netdev_t *dev, netdev_rcv_data_cb_t cb);

/**
* @see netdev_driver_t::rem_receive_data_callback
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*rem_receive_data_callback)(netdev_t *dev, netdev_rcv_data_cb_t cb);

/**
Expand All @@ -174,6 +182,8 @@ typedef struct {
* NETDEV_OPT_TX_POWER | int | >= 4
* NETDEV_OPT_MAX_PACKET_SIZE | uint8_t | >= 1
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*get_option)(netdev_t *dev, netdev_opt_t opt, void *value,
size_t *value_len);

Expand All @@ -192,22 +202,30 @@ typedef struct {
*
* NETDEV_OPT_MAX_PACKET_SIZE can not be set.
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*set_option)(netdev_t *dev, netdev_opt_t opt, void *value,
size_t value_len);

/**
* @see netdev_driver_t::get_state
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*get_state)(netdev_t *dev, netdev_state_t *state);

/**
* @see netdev_driver_t::set_state
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (*set_state)(netdev_t *dev, netdev_state_t state);

/**
* @see netdev_driver_t::event
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
void (*event)(netdev_t *dev, uint32_t event_type);

/**
Expand Down Expand Up @@ -238,6 +256,8 @@ typedef struct {
* @return The outcome of this packet's transmission.
* @see netdev_802154_tx_status_t
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
netdev_802154_tx_status_t (* load_tx)(netdev_t *dev,
netdev_802154_pkt_kind_t kind,
netdev_802154_node_addr_t *dest,
Expand All @@ -255,6 +275,8 @@ typedef struct {
* @return The outcome of this packet's transmission.
* @see netdev_802154_tx_status_t
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
netdev_802154_tx_status_t (* transmit)(netdev_t *dev);

/**
Expand Down Expand Up @@ -286,6 +308,8 @@ typedef struct {
* @return The outcome of this packet's transmission.
* @see netdev_802154_tx_status_t
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
netdev_802154_tx_status_t (* send)(netdev_t *dev,
netdev_802154_pkt_kind_t kind,
netdev_802154_node_addr_t *dest,
Expand Down Expand Up @@ -314,6 +338,8 @@ typedef struct {
* @return -ENOBUFS, if maximum number of registrable callbacks is exceeded
* @return -ENODEV, if *dev* is not recognized
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (* add_receive_raw_callback)(netdev_t *dev, netdev_802154_raw_packet_cb_t recv_func);

/**
Expand All @@ -327,6 +353,8 @@ typedef struct {
* @return 0, on success
* @return -ENODEV, if *dev* is not recognized
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (* rem_receive_raw_callback)(netdev_t *dev, netdev_802154_raw_packet_cb_t recv_func);

/**
Expand All @@ -339,6 +367,8 @@ typedef struct {
* @return 0 if another transmission is already running.
* @return -ENODEV, if *dev* is not recognized
*/
/* suppress because interface is not used yet */
/* cppcheck-suppress unusedStructMember */
int (* channel_is_clear)(netdev_t *dev);
} netdev_802154_driver_t;

Expand Down

0 comments on commit 02869ed

Please sign in to comment.