diff options
| author | Yogesh Tyagi <yogesh.tyagi@intel.com> | 2026-02-12 23:23:35 +0800 |
|---|---|---|
| committer | Yogesh Tyagi <yogesh.tyagi@intel.com> | 2026-02-18 01:34:43 +0530 |
| commit | cd49bdbdcfa68f06f9fe5c824afdd32f2c305667 (patch) | |
| tree | 1a3294d40496035e337f054fb7c65537fa99b1c8 | |
| parent | cde5fc55056a33bd00ba1c4adac908c021185dc1 (diff) | |
| download | meta-intel-cd49bdbdcfa68f06f9fe5c824afdd32f2c305667.tar.gz | |
metee: Use targeted pragma to suppress sign-conversion warnings
Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
| -rw-r--r-- | recipes-support/metee/metee/0001-Suppress-sign-conversion-warning-only-for-ioctl-call.patch | 62 | ||||
| -rw-r--r-- | recipes-support/metee/metee_6.0.2.bb | 2 |
2 files changed, 63 insertions, 1 deletions
diff --git a/recipes-support/metee/metee/0001-Suppress-sign-conversion-warning-only-for-ioctl-call.patch b/recipes-support/metee/metee/0001-Suppress-sign-conversion-warning-only-for-ioctl-call.patch new file mode 100644 index 00000000..ae607d94 --- /dev/null +++ b/recipes-support/metee/metee/0001-Suppress-sign-conversion-warning-only-for-ioctl-call.patch | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | From d59b95a4cc0fdfd67745f7c6e5c098e95c3bd70a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 3 | Date: Wed, 11 Feb 2026 21:40:28 +0800 | ||
| 4 | Subject: [PATCH] Suppress sign-conversion warning only for ioctl calls | ||
| 5 | |||
| 6 | Add targeted #pragma directives to suppress -Wsign-conversion warnings | ||
| 7 | only around specific ioctl() calls where musl's unsigned long macros | ||
| 8 | are converted to int. This preserves the warning for the rest of the | ||
| 9 | codebase where it can catch real bugs. | ||
| 10 | |||
| 11 | The ioctl macro/function signature mismatch is a known harmless | ||
| 12 | difference between glibc and musl - the bit pattern is preserved. | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> | ||
| 16 | --- | ||
| 17 | src/linux/mei.c | 9 +++++++++ | ||
| 18 | 1 file changed, 9 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/src/linux/mei.c b/src/linux/mei.c | ||
| 21 | index 3a500ce..9778608 100644 | ||
| 22 | --- a/src/linux/mei.c | ||
| 23 | +++ b/src/linux/mei.c | ||
| 24 | @@ -193,8 +193,11 @@ static inline int __mei_connect(struct mei *me, struct mei_connect_client_data * | ||
| 25 | int rc; | ||
| 26 | |||
| 27 | errno = 0; | ||
| 28 | + #pragma GCC diagnostic push | ||
| 29 | + #pragma GCC diagnostic ignored "-Wsign-conversion" | ||
| 30 | rc = ioctl(me->fd, IOCTL_MEI_CONNECT_CLIENT, d); | ||
| 31 | me->last_err = errno; | ||
| 32 | + #pragma GCC diagnostic pop | ||
| 33 | return rc == -1 ? -me->last_err : 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | @@ -204,8 +207,11 @@ static inline int __mei_connect_vtag(struct mei *me, | ||
| 37 | int rc; | ||
| 38 | |||
| 39 | errno = 0; | ||
| 40 | + #pragma GCC diagnostic push | ||
| 41 | + #pragma GCC diagnostic ignored "-Wsign-conversion" | ||
| 42 | rc = ioctl(me->fd, IOCTL_MEI_CONNECT_CLIENT_VTAG, d); | ||
| 43 | me->last_err = errno; | ||
| 44 | + #pragma GCC diagnostic pop | ||
| 45 | return rc == -1 ? -me->last_err : 0; | ||
| 46 | } | ||
| 47 | |||
| 48 | @@ -225,8 +231,11 @@ static inline int __mei_notify_get(struct mei *me) | ||
| 49 | int rc; | ||
| 50 | |||
| 51 | errno = 0; | ||
| 52 | + #pragma GCC diagnostic push | ||
| 53 | + #pragma GCC diagnostic ignored "-Wsign-conversion" | ||
| 54 | rc = ioctl(me->fd, IOCTL_MEI_NOTIFY_GET, ¬ification); | ||
| 55 | me->last_err = errno; | ||
| 56 | + #pragma GCC diagnostic pop | ||
| 57 | return rc == -1 ? -me->last_err : 0; | ||
| 58 | } | ||
| 59 | |||
| 60 | -- | ||
| 61 | 2.37.3 | ||
| 62 | |||
diff --git a/recipes-support/metee/metee_6.0.2.bb b/recipes-support/metee/metee_6.0.2.bb index 64189172..c26734d6 100644 --- a/recipes-support/metee/metee_6.0.2.bb +++ b/recipes-support/metee/metee_6.0.2.bb | |||
| @@ -11,7 +11,7 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | |||
| 11 | inherit cmake | 11 | inherit cmake |
| 12 | 12 | ||
| 13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \ | 13 | SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \ |
| 14 | file://0001-Fix-sign-conversion-warnings-with-musl-ioctl.patch \ | 14 | file://0001-Suppress-sign-conversion-warning-only-for-ioctl-call.patch \ |
| 15 | " | 15 | " |
| 16 | SRCREV = "93784f62070b2bc4e84b51e23c9add61f7600444" | 16 | SRCREV = "93784f62070b2bc4e84b51e23c9add61f7600444" |
| 17 | 17 | ||
