From b370fcfa6fd36920885e33b51b786e2326647d3e Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 2 Aug 2020 16:36:52 +1000 Subject: [PATCH] Fix warnings --- .../TS100/Core/Drivers/FUSB302/policy_engine_user.cpp | 8 ++------ workspace/TS100/Core/Drivers/FUSB302/protocol_tx.cpp | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/workspace/TS100/Core/Drivers/FUSB302/policy_engine_user.cpp b/workspace/TS100/Core/Drivers/FUSB302/policy_engine_user.cpp index 71e14f33..4e65cf85 100644 --- a/workspace/TS100/Core/Drivers/FUSB302/policy_engine_user.cpp +++ b/workspace/TS100/Core/Drivers/FUSB302/policy_engine_user.cpp @@ -114,7 +114,6 @@ bool PolicyEngine::pdbs_dpm_evaluate_capability( /* Update requested voltage */ _requested_voltage = 5000; - return false; } @@ -186,6 +185,7 @@ void PolicyEngine::pdbs_dpm_get_sink_capability(union pd_msg *cap) { bool PolicyEngine::pdbs_dpm_evaluate_typec_current( enum fusb_typec_current tcc) { + (void) tcc; //This is for evaluating 5V static current advertised by resistors /* We don't control the voltage anymore; it will always be 5 V. */ current_voltage_mv = _requested_voltage = 5000; @@ -194,7 +194,6 @@ bool PolicyEngine::pdbs_dpm_evaluate_typec_current( return true; } - void PolicyEngine::pdbs_dpm_transition_default() { /* Cast the dpm_data to the right type */ @@ -204,9 +203,6 @@ void PolicyEngine::pdbs_dpm_transition_default() { pdNegotiationComplete = false; } - - - void PolicyEngine::pdbs_dpm_transition_requested() { /* Cast the dpm_data to the right type */ pdNegotiationComplete = true; @@ -221,7 +217,7 @@ bool PolicyEngine::messageWaiting() { } bool PolicyEngine::readMessage() { - return xQueueReceive(messagesWaiting, &tempMessage,0) == pdTRUE; + return xQueueReceive(messagesWaiting, &tempMessage, 0) == pdTRUE; } void PolicyEngine::pdbs_dpm_transition_typec() { diff --git a/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.cpp b/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.cpp index 61bdb101..6caeeac3 100644 --- a/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.cpp +++ b/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.cpp @@ -277,6 +277,7 @@ bool ProtocolTransmit::messagePending() { if (messagesWaiting) { return uxQueueMessagesWaiting(messagesWaiting) > 0; } + return false; } void ProtocolTransmit::getMessage() { @@ -293,4 +294,5 @@ ProtocolTransmit::Notifications ProtocolTransmit::waitForEvent(uint32_t mask, mask, pdFALSE, ticksToWait); } + return (Notifications)0; }