chore: fix compiler warnings (#1412)

* chore: fix compiler warnings
This commit is contained in:
Charles Kerr
2020-08-27 18:41:26 -05:00
committed by GitHub
parent cf9b81eb7d
commit e127b20c05
17 changed files with 85 additions and 98 deletions

View File

@@ -31,16 +31,5 @@ void tr_lpdUninit(tr_session*);
bool tr_lpdEnabled(tr_session const*);
bool tr_lpdSendAnnounce(tr_torrent const*);
/**
* @defgroup Preproc Helper macros
* @{
*
* @def lengthof
* @brief returns the static length of a C array type
* @note A lower case macro name is tolerable here since this definition of lengthof()
* is intimately related to sizeof semantics.
* Meaningful return values are only guaranteed for true array types. */
#define lengthof(arr) (sizeof(*(arr)) > 0 ? sizeof(arr) / sizeof(*(arr)) : 0)
/**
* @} */