core,network: Use const qualifiers for block-local variables in macro functions (#4019)

Prevents discard-qualifiers warnings when the passed variable was const
This commit is contained in:
Felipe Sateler
2016-08-23 12:29:30 +03:00
committed by Evgeny Vereshchagin
parent 83f12b27d1
commit 8dec4a9d2d
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
#define log_link_full(link, level, error, ...) \
({ \
Link *_l = (link); \
const Link *_l = (link); \
_l ? log_object_internal(level, error, __FILE__, __LINE__, __func__, "INTERFACE=", _l->ifname, ##__VA_ARGS__) : \
log_internal(level, error, __FILE__, __LINE__, __func__, ##__VA_ARGS__); \
}) \
+1 -1
View File
@@ -180,7 +180,7 @@ const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsign
#define log_netdev_full(netdev, level, error, ...) \
({ \
NetDev *_n = (netdev); \
const NetDev *_n = (netdev); \
_n ? log_object_internal(level, error, __FILE__, __LINE__, __func__, "INTERFACE=", _n->ifname, ##__VA_ARGS__) : \
log_internal(level, error, __FILE__, __LINE__, __func__, ##__VA_ARGS__); \
})