1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: hint the compiler about a constant type.
This fixes the following build failure with gcc 14:
.
dmSML/aPOSIXaio.c:115:28: error: passing argument 1 of ‘aio_suspend’ from incompatible pointer type [-Wincompatible-pointer-types]
115 | rval = aio_suspend(request_array, 1, &zero_wait);
| ^~~~~~~~~~~~~
| |
| struct aiocb **
In file included from /usr/include/features.h:502,
from /usr/include/x86_64-linux-gnu/sys/types.h:25,
from ../libMems/dmSML/asyncio.h:24,
from ../libMems/dmSML/aPOSIXaio.h:8,
from dmSML/aPOSIXaio.c:5:
/usr/include/aio.h:202:12: note: expected ‘const struct aiocb * const*’ but argument is of type ‘struct aiocb **’
202 | extern int __REDIRECT_NTH (aio_suspend,
| ^~~~~~~~~~~~~~
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075186
Forwarded: no
Last-Update: 2024-07-17
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- libmems.orig/libMems/dmSML/aPOSIXaio.c
+++ libmems/libMems/dmSML/aPOSIXaio.c
@@ -104,9 +104,9 @@
// PRECONDITION: file->queuetail is not null
// simply queries wether the first request submitted to the file has
// completed yet.
-int QueryLastCompletePAIO( aFILE * file ){
+int QueryLastCompletePAIO( const aFILE * file ){
int rval;
- struct aiocb *request_array[] = { file->queuetail->aio_cb };
+ const struct aiocb * request_array[] = { (const struct aiocb*)file->queuetail->aio_cb };
struct timespec zero_wait;
zero_wait.tv_sec = 0;
--- libmems.orig/libMems/dmSML/aPOSIXaio.h
+++ libmems/libMems/dmSML/aPOSIXaio.h
@@ -13,6 +13,6 @@
int WritePAIO( aFILE * file, aIORec * rec );
int ReadPAIO( aFILE * file, aIORec * rec );
-int QueryLastCompletePAIO( aFILE * file );
+int QueryLastCompletePAIO( const aFILE * file );
#endif /* _aPOSIXaio_h_ */
|