diff options
Diffstat (limited to 'os/hal/include/hal_buffers.h')
-rw-r--r-- | os/hal/include/hal_buffers.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/os/hal/include/hal_buffers.h b/os/hal/include/hal_buffers.h index c7f731f83..bedc56c56 100644 --- a/os/hal/include/hal_buffers.h +++ b/os/hal/include/hal_buffers.h @@ -132,7 +132,7 @@ typedef io_buffers_queue_t output_buffers_queue_t; * @param[in] size size of the buffers
*/
#define BQ_BUFFER_SIZE(n, size) \
- (((size_t)(size) + (sizeof (size_t)) * (size_t)(n)))
+ ((size_t)(size) + ((sizeof (size_t)) * (size_t)(n)))
/**
* @name Macro Functions
@@ -192,8 +192,10 @@ typedef io_buffers_queue_t output_buffers_queue_t; *
* @iclass
*/
-#define ibqIsFullI(ibqp) ((bool)(((ibqp)->bwrptr == (ibqp)->brdptr) && \
- ((ibqp)->bcounter != 0U)))
+#define ibqIsFullI(ibqp) \
+ /*lint -save -e9007 [13.5] No side effects, a pointer is passed.*/ \
+ ((bool)(((ibqp)->bwrptr == (ibqp)->brdptr) && ((ibqp)->bcounter != 0U))) \
+ /*lint -restore*/
/**
* @brief Evaluates to @p true if the specified output buffers queue is empty.
@@ -205,8 +207,10 @@ typedef io_buffers_queue_t output_buffers_queue_t; *
* @iclass
*/
-#define obqIsEmptyI(obqp) ((bool)(((obqp)->bwrptr == (obqp)->brdptr) && \
- ((obqp)->bcounter != 0U)))
+#define obqIsEmptyI(obqp) \
+ /*lint -save -e9007 [13.5] No side effects, a pointer is passed.*/ \
+ ((bool)(((obqp)->bwrptr == (obqp)->brdptr) && ((obqp)->bcounter != 0U))) \
+ /*lint -restore*/
/**
* @brief Evaluates to @p true if the specified output buffers queue is full.
@@ -228,7 +232,7 @@ typedef io_buffers_queue_t output_buffers_queue_t; #ifdef __cplusplus
extern "C" {
#endif
- void ibqObjectInit(io_buffers_queue_t *ibqp, uint8_t *bp,
+ void ibqObjectInit(input_buffers_queue_t *ibqp, uint8_t *bp,
size_t size, size_t n,
bqnotify_t infy, void *link);
void ibqResetI(input_buffers_queue_t *ibqp);
|