Skip to content
Snippets Groups Projects
Commit 6ccae228 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix runtime errors when built with UBSan

nopen.c:37:15: runtime error: left shift of 1 by 31 places cannot be
 represented in type 'int'
nopen.c:39:18: runtime error: left shift of 1 by 31 places cannot be
 represented in type 'int'
userdat.c:251:111: runtime error: left shift of 1 by 31 places cannot be
 represented in type 'int'

There are lot of 1<<31 macro definitions in this repo, so I'm expecting a
lot more of this type of fix to be required to make UBSan happy.
parent f9db3f70
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@
#define O_BINARY 0 /* all files in binary mode on Unix */
#endif
#undef O_DENYNONE
#define O_DENYNONE (1<<31) /* req'd for Baja/nopen compatibility */
#define O_DENYNONE (1U<<31) /* req'd for Baja/nopen compatibility */
#define SH_DENYNO 2 /* no locks */
#ifdef F_SANEWRLCKNO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment