[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [ktechlab] src/electronics: Fix a narrowing conversion error spotted by gcc
From: Luigi Toscano <null () kde ! org>
Date: 2016-12-31 15:15:06
Message-ID: E1cNLNC-0005Bj-TI () code ! kde ! org
[Download RAW message or body]
Git commit 26a24f65e7bb7bb9507f3f507de004dccaf792a6 by Luigi Toscano.
Committed on 31/12/2016 at 15:14.
Pushed by ltoscano into branch 'master'.
Fix a narrowing conversion error spotted by gcc
Full error:
error: narrowing conversion of ‘2147577989ul' from
‘long unsigned int' to ‘int' inside { } [-Wnarrowing]
The second parameter of ioctl where the arrays are used is an unsigned long.
M +2 -2 src/electronics/port.cpp
https://commits.kde.org/ktechlab/26a24f65e7bb7bb9507f3f507de004dccaf792a6
diff --git a/src/electronics/port.cpp b/src/electronics/port.cpp
index 7a90d92a..ed8959e9 100644
--- a/src/electronics/port.cpp
+++ b/src/electronics/port.cpp
@@ -274,13 +274,13 @@ const int INPUT_MODE_BIT = 1 << 21; // Controls if the data pins are input or ou
#define PPRELEASE 0xCAFE
#endif
-const int IOCTL_REG_READ[3] = {
+const unsigned long IOCTL_REG_READ[3] = {
PPRDATA,
PPRSTATUS,
PPRCONTROL,
};
-const int IOCTL_REG_WRITE[3] = {
+const unsigned long IOCTL_REG_WRITE[3] = {
PPWDATA,
0,
PPWCONTROL,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic