Comments (11)
Fixed by commit 873c8ba.
Closing.
from hyperion.
Here's a bunch I just ran into, on Debian 12, with gcc 12.2.0.
Using commit: 140a0cf
CC dat.lo
In file included from ../hercules.h:104,
from ../cpu.c:43:
../cpu.c: In function ‘s370_process_interrupt’:
../cpu.c:1876:29: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 9 has type ‘char *’ [-Wformat=]
1876 | "auto-" );
| ~~~~~~~ ^
| |
| char *
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
../cpu.c:1876:29: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
1876 | "auto-" );
| ^
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
../cpu.c: In function ‘s390_process_interrupt’:
../cpu.c:1876:29: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 9 has type ‘char *’ [-Wformat=]
1876 | "auto-" );
| ~~~~~~~ ^
| |
| char *
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
../cpu.c:1876:29: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
1876 | "auto-" );
| ^
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
../cpu.c: In function ‘z900_process_interrupt’:
../cpu.c:1876:29: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 9 has type ‘char *’ [-Wformat=]
1876 | "auto-" );
| ~~~~~~~ ^
| |
| char *
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
../cpu.c:1876:29: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
1876 | "auto-" );
| ^
../msgenu.h:99:98: note: in definition of macro ‘PFWRITEMSG’
99 | #define PFWRITEMSG( pan, f, fmt, ... ) fwritemsg( __FILE__, __LINE__, __FUNCTION__, pan, f, fmt, ## __VA_ARGS__ )
| ^~~
../msgenu.h:108:36: note: in expansion of macro ‘PWRITEMSG’
108 | #define LOGMSG( fmt, ... ) PWRITEMSG( WRMSG_NORMAL, fmt, ## __VA_ARGS__ )
| ^~~~~~~~~
../msgenu.h:110:36: note: in expansion of macro ‘LOGMSG’
110 | #define WRMSG( id, sev, ... ) LOGMSG( #id "%s " id "\n", sev, ## __VA_ARGS__ )
| ^~~~~~
../cpu.c:1875:17: note: in expansion of macro ‘WRMSG’
1875 | WRMSG( HHC00826, "W", PTYPSTR( sysblk.pcpu ),
| ^~~~~
from hyperion.
Fix(es) committed. Please try again.
from hyperion.
Fish,
That worked! Good work!
The only one I see now on that system is this (which I think we've seen before):
CC ckddasd.lo
../ckddasd.c: In function ‘PerformSubsystemFunction.constprop’:
../ckddasd.c:6016:9: warning: ‘orig_iobuf’ may be used uninitialized [-Wmaybe-uninitialized]
6016 | memmove( &orig_iobuf[0], &iobuf[0], dev->ckdssdlen );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../ckddasd.c:5661:12: note: ‘orig_iobuf’ was declared here
5661 | BYTE* orig_iobuf;
| ^~~~~~~~~~
Bill
from hyperion.
The only one I see now on that system is this (which I think we've seen before):
That's supposed to have been fixed by commit 873c8ba! (And yes, I tested it. Both before the fix and again afterwards.)
What version of gcc are you using? Because as committed, the above fix (workaround) should apply to any gcc version > 11. Maybe we need to change it to some earlier version?
from hyperion.
gcc 12.2
The diff for the commit you've mentioned shows some lines that to me look unchanged, for what it's worth.
from hyperion.
The diff for the commit you've mentioned shows some lines that to me look unchanged, for what it's worth.
Really? Because that commit SHOULD show that for gcc >= 11.0.0, the "-Wmaybe-uninitialized" warning is being disabled:
from hyperion.
Fish,
The warning is for lines outside the range being protected.
You're guarding lines 6755 - 6999, and the warnings are at 5661 and 6016..
CC ckddasd.lo ../ckddasd.c: In function ‘PerformSubsystemFunction.constprop’: ../ckddasd.c:6016:9: warning: ‘orig_iobuf’ may be used uninitialized [-Wmaybe-uninitialized] 6016 | memmove( &orig_iobuf[0], &iobuf[0], dev->ckdssdlen ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../ckddasd.c:5661:12: note: ‘orig_iobuf’ was declared here 5661 | BYTE* orig_iobuf; | ^~~~~~~~~~
from hyperion.
You're guarding lines 6755 - 6999, and the warnings are at 5661 and 6016..
(Oops!) I missed that the first time. Sorry. I'll get that fixed right away. It's the same fix, I just need to wrap it around the PerformSubsystemFunction
too. Give me a minute.
from hyperion.
Should be fixed now by commit 23c8c46.
from hyperion.
Should be fixed now by commit 23c8c46.
Verified -- fixed now.
from hyperion.
Related Issues (20)
- using the macro BUILD_APPLE_M1 set by configure prevents a universal build HOT 17
- async 'sf' cmd can trip lock bug in dasd caching causing CRASH
- runnig z/osmf IZUSVR1 procedure failed in z/OS 2.5 HOT 1
- 10 seconds intermittent delay with multiple paths to a DASD device HOT 5
- Problem if ENGINES lists fewer than MAXCPU engines HOT 1
- Visual Studio 17.9.0 generating warning C4789 HOT 1
- Missing support for clang builds under Windows MSVC HOT 32
- gmake check fails HOT 3
- Confusing response to 'stop' command HOT 9
- CCKDDIAG needs to provide support for shadow files HOT 1
- GIT: Additional gitignore files? HOT 1
- FORCE parameter on 'sf' command does not work correctly HOT 14
- some dasd tests pollute the repository with the shadow files HOT 3
- question about the __SSE2__ intrinsics ( x86intrin.h ) HOT 6
- CTCE links fail using TSAF under VM HOT 37
- Latest changes for Windows break build on Linux HOT 5
- Hercules just ends without completing processing config file on Windows 11 HOT 44
- standalone physical restore issue HOT 27
- Possible run zPDT CNF on Hercules? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperion.