Skip to content

Commit

Permalink
Initialize variable to quiet compiler finding
Browse files Browse the repository at this point in the history
GCC 12.2.0 believes that the variable secured_context might be used in
the switch-case LIBSPDM_DATA_SESSION_SEQUENCE_NUMBER_REQ_DIR without
being initialized.  This though does not happen because in that case
need_session_info_for_data() will return true and secured_context will
be set.

Change-Id: I1f661115b9a9c27eeddc4238c1887fdd0566b533
Signed-off-by: Patrick Wildt <[email protected]>
  • Loading branch information
Patrick Wildt committed Feb 19, 2024
1 parent 0882902 commit 839136b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/spdm_common_lib/libspdm_com_context_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ libspdm_return_t libspdm_get_data(void *spdm_context, libspdm_data_type_t data_t
void *data, size_t *data_size)
{
libspdm_context_t *context;
libspdm_secured_message_context_t *secured_context;
libspdm_secured_message_context_t *secured_context = NULL;
size_t target_data_size;
void *target_data;
uint32_t session_id;
Expand Down

0 comments on commit 839136b

Please sign in to comment.