summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Thomsen <brant.thomsen@harman.com>2017-07-14 16:02:27 -0600
committerBrant Thomsen <brant.thomsen@harman.com>2017-07-14 16:02:27 -0600
commit967fd6a84d0e8025f4eb5155a7af51b04cb153d8 (patch)
tree112f046573aaac6ec481d1e6519e1d5812b3e947
parent97d837c495ceb7e105d64edc2077ef70dca3802c (diff)
downloadOpen-AVB-967fd6a84d0e8025f4eb5155a7af51b04cb153d8.tar.gz
Fixed compile warning
Addressed compile warning that class_a_bytes_per_sec and class_b_bytes_per_sec are not used if AVB_FEATURE_IGB==0.
-rw-r--r--lib/avtp_pipeline/qmgr/openavb_qmgr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/avtp_pipeline/qmgr/openavb_qmgr.c b/lib/avtp_pipeline/qmgr/openavb_qmgr.c
index 0be78e8a..d3a9b84a 100644
--- a/lib/avtp_pipeline/qmgr/openavb_qmgr.c
+++ b/lib/avtp_pipeline/qmgr/openavb_qmgr.c
@@ -103,18 +103,20 @@ static qmgrStream_t qmgr_streams[MAX_AVB_STREAMS];
static bool setupHWQueue(int nClass, unsigned classBytesPerSec)
{
int err = 0;
+#if (AVB_FEATURE_IGB)
U32 class_a_bytes_per_sec, class_b_bytes_per_sec;
+#endif
AVB_TRACE_ENTRY(AVB_TRACE_QUEUE_MANAGER);
+#if (AVB_FEATURE_IGB)
if (nClass == SR_CLASS_A) {
class_a_bytes_per_sec = classBytesPerSec;
- class_b_bytes_per_sec = qmgr_classes[SR_CLASS_B].classBytesPerSec;
+ class_b_bytes_per_sec = qmgr_classes[SR_CLASS_B].classBytesPerSec;
} else {
- class_a_bytes_per_sec = qmgr_classes[SR_CLASS_A].classBytesPerSec;
+ class_a_bytes_per_sec = qmgr_classes[SR_CLASS_A].classBytesPerSec;
class_b_bytes_per_sec = classBytesPerSec;
}
-#if (AVB_FEATURE_IGB)
err = igb_set_class_bandwidth2(qdisc_data.igb_dev, class_a_bytes_per_sec, class_b_bytes_per_sec);
if (err)
AVB_LOGF_ERROR("Adding stream; igb_set_class_bandwidth failed: %s", strerror(err));