All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] huawei, util: Fix a couple of implicit enum conversions
Date: Tue, 22 Dec 2020 10:33:24 -0600	[thread overview]
Message-ID: <3d7e6109-11f6-37cc-946f-c26320835c40@gmail.com> (raw)
In-Reply-To: <20201220111827.2119273-1-richard.rojfors@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

Hi Richard,

On 12/20/20 5:18 AM, richard.rojfors(a)gmail.com wrote:
> From: Richard Röjfors <richard@puffinpack.se>
> 
> GCC 10 warns about a couple of implicit conversions;
> 
> huawei: Member from the incorrect enum was returned,
> both had the value 0, so the code would still work.
> 
> drivers/huaweimodem/radio-settings.c: In function ‘band_gsm_from_huawei’:
> drivers/huaweimodem/radio-settings.c:107:10: error: implicit conversion from ‘enum ofono_radio_band_umts’ to ‘enum ofono_radio_band_gsm’ [-Werror=enum-conversion]
>    107 |   return OFONO_RADIO_BAND_UMTS_ANY;
> 
> util: smsutil and util has an enum each for representing
> the same thing; The SMS alphabet. They share the same
> values, so an explicit type cast makes GCC happy.
> 
> src/smsutil.c: In function ‘sms_text_prepare_with_alphabet’:
> src/smsutil.c:3594:8: error: implicit conversion from ‘enum sms_alphabet’ to ‘enum gsm_dialect’ [-Werror=enum-conversion]
>   3594 |        alphabet, &used_locking,
> ---
>   drivers/huaweimodem/radio-settings.c | 2 +-
>   src/smsutil.c                        | 5 ++++-
>   2 files changed, 5 insertions(+), 2 deletions(-)
> 

I split this into two commits and applied.  Thanks!

Regards,
-Denis

      reply	other threads:[~2020-12-22 16:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 11:18 [PATCH] huawei, util: Fix a couple of implicit enum conversions richard.rojfors
2020-12-22 16:33 ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d7e6109-11f6-37cc-946f-c26320835c40@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.