summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2025-09-29 23:08:42 +0100
committerFrédéric Desbiens <[email protected]>2025-09-29 23:08:42 +0100
commit3770e71f132b0537ecc9ea8f5303006a74bc0ea7 (patch)
treecaf915dceb30142d66f41c18aaf36dce66c7485c
parent0330117c9f11f26c95ed049e637c9e091737e87f (diff)
Fixed integer comparisons of different signedness.
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c2
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_raw_sampling_parse.c2
-rw-r--r--common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c b/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
index 5b4e494..f93505d 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_alternate_setting_locate.c
@@ -225,7 +225,7 @@ UINT specific_frequency_count;
else
{
- if (descriptor_length < (UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (3 * audio_interface_descriptor.bSamFreqType)))
+ if (descriptor_length < (UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (UINT)(3 * audio_interface_descriptor.bSamFreqType)))
{
return(UX_DESCRIPTOR_CORRUPTED);
}
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_raw_sampling_parse.c b/common/usbx_host_classes/src/ux_host_class_audio_raw_sampling_parse.c
index 73a83fd..0a850bd 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_raw_sampling_parse.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_raw_sampling_parse.c
@@ -246,7 +246,7 @@ UINT descriptor_length = packed_audio_descriptor[0];
}
else
{
- if (descriptor_length < (8 + (3 * packed_audio_descriptor[7])))
+ if (descriptor_length < (UINT)(8 + (3 * packed_audio_descriptor[7])))
{
/* Error trap. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_DESCRIPTOR_CORRUPTED);
diff --git a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
index 04de8b3..9cd2025 100644
--- a/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
+++ b/common/usbx_host_classes/src/ux_host_class_audio_streaming_sampling_get.c
@@ -237,7 +237,7 @@ UINT previous_match_found;
else
{
- if (descriptor_length < (UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (3 * audio_interface_descriptor.bSamFreqType)))
+ if (descriptor_length < (UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (UINT)(3 * audio_interface_descriptor.bSamFreqType)))
{
/* Error trap. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_DESCRIPTOR_CORRUPTED);
@@ -315,7 +315,7 @@ UINT previous_match_found;
else
{
- if (descriptor_length < UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (3 * audio_interface_descriptor.bSamFreqType))
+ if (descriptor_length < UX_HOST_CLASS_AUDIO_INTERFACE_DESCRIPTOR_LENGTH + (UINT)(3 * audio_interface_descriptor.bSamFreqType))
{
/* Error trap. */
_ux_system_error_handler(UX_SYSTEM_LEVEL_THREAD, UX_SYSTEM_CONTEXT_CLASS, UX_DESCRIPTOR_CORRUPTED);