Bug 94687 - clang error/warning: wrong enum type in mm_modem_oma_get_features()
Summary: clang error/warning: wrong enum type in mm_modem_oma_get_features()
Status: RESOLVED FIXED
Alias: None
Product: ModemManager
Classification: Unclassified
Component: libmm-glib (show other bugs)
Version: git master
Hardware: All All
: medium minor
Assignee: ModemManager bug user
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-24 20:59 UTC by Brian
Modified: 2016-03-25 10:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] libmm-glib: fix enum conversion warning/error (1.47 KB, text/plain)
2016-03-24 20:59 UTC, Brian
Details

Description Brian 2016-03-24 20:59:13 UTC
Created attachment 122526 [details]
[PATCH] libmm-glib: fix enum conversion warning/error

Compiling with clang using -Werror -Wenum-conversion causes the build to fail:

mm-modem-oma.c:400:51: error: implicit conversion from enumeration type 'MMOmaSessionType' to different enumeration type 'MMOmaFeature'
      [-Werror,-Wenum-conversion]
    g_return_val_if_fail (MM_IS_MODEM_OMA (self), MM_OMA_SESSION_TYPE_UNKNOWN);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmessages.h:382:11: note: expanded from macro 'g_return_val_if_fail'
         return (val);                                                  \
         ~~~~~~  ^~~

Attaching patch to fix this.
Comment 1 Aleksander Morgado 2016-03-25 10:14:34 UTC
Pushed to git master, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.