Skip to content

Commit

Permalink
Use designated initializers to avoid a warning about missing fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
markand authored and PJK committed Dec 3, 2022
1 parent e87d571 commit fc2151f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/cbor/streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0x1E: /* Fallthrough */
case 0x1F:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0x20: /* Fallthrough */
case 0x21: /* Fallthrough */
case 0x22: /* Fallthrough */
Expand Down Expand Up @@ -184,7 +184,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0x3E: /* Fallthrough */
case 0x3F:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0x40: /* Fallthrough */
case 0x41: /* Fallthrough */
case 0x42: /* Fallthrough */
Expand Down Expand Up @@ -231,7 +231,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0x5D: /* Fallthrough */
case 0x5E:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0x5F:
/* Indefinite byte string */
{
Expand Down Expand Up @@ -284,7 +284,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0x7D: /* Fallthrough */
case 0x7E:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0x7F:
/* Indefinite length string */
{
Expand Down Expand Up @@ -357,7 +357,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0x9D: /* Fallthrough */
case 0x9E:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0x9F:
/* Indefinite length array */
{
Expand Down Expand Up @@ -430,7 +430,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xBD: /* Fallthrough */
case 0xBE:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0xBF:
/* Indefinite length map */
{
Expand Down Expand Up @@ -470,7 +470,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xD3: /* Fallthrough */
case 0xD4: /* Unassigned tag value */
{
return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR};
return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR};
}
case 0xD5: /* Expected b64url conversion tag - fallthrough */
case 0xD6: /* Expected b64 conversion tag - fallthrough */
Expand Down Expand Up @@ -513,7 +513,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xDE: /* Fallthrough */
case 0xDF: /* Reserved */
{
return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR};
return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR};
}
case 0xE0: /* Fallthrough */
case 0xE1: /* Fallthrough */
Expand All @@ -536,7 +536,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xF2: /* Fallthrough */
case 0xF3: /* Simple value - unassigned */
{
return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR};
return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR};
}
case 0xF4:
/* False */
Expand Down Expand Up @@ -564,7 +564,7 @@ struct cbor_decoder_result cbor_stream_decode(
}
case 0xF8:
/* 1B simple value, unassigned */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0xF9:
/* 2B float */
{
Expand Down Expand Up @@ -593,7 +593,7 @@ struct cbor_decoder_result cbor_stream_decode(
case 0xFD: /* Fallthrough */
case 0xFE:
/* Reserved */
{ return (struct cbor_decoder_result){0, CBOR_DECODER_ERROR}; }
{ return (struct cbor_decoder_result){.status = CBOR_DECODER_ERROR}; }
case 0xFF:
/* Break */
{
Expand Down

0 comments on commit fc2151f

Please sign in to comment.