summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichal Terepeta <michal.terepeta@gmail.com>2018-05-13 18:34:03 -0400
committerBen Gamari <ben@smart-cactus.org>2018-05-13 18:34:09 -0400
commiteb39f98891482366cf1130fe58d728b93f0dd49f (patch)
tree94c7adf6e8d239ea6f97853264cd8dd9fb7b6593 /includes
parent7c665f9ce0980ee7c81a44c8f861686395637453 (diff)
downloadhaskell-eb39f98891482366cf1130fe58d728b93f0dd49f.tar.gz
Fix a few GCC warnings
GCC 8 now generates warnings for incompatible function pointer casts [-Werror=cast-function-type]. Apparently there are a few of those in rts code, which makes `./validate` unhappy (since we compile with `-Werror`) This commit tries to fix these issues by changing the functions to have the correct type (and, if necessary, moving the casts into those functions). For instance, hash/comparison function are declared (`Hash.h`) to take `StgWord` but we want to use `StgWord64[2]` in `StaticPtrTable.c`. Instead of casting the function pointers, we can cast the `StgWord` parameter to `StgWord*`. I think this should be ok since `StgWord` should be the same size as a pointer. Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4673
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/OSThreads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/rts/OSThreads.h b/includes/rts/OSThreads.h
index abb3120088..d2c4a6a54e 100644
--- a/includes/rts/OSThreads.h
+++ b/includes/rts/OSThreads.h
@@ -166,7 +166,7 @@ extern OSThreadId osThreadId ( void );
extern void shutdownThread ( void ) GNUC3_ATTRIBUTE(__noreturn__);
extern void yieldThread ( void );
-typedef void OSThreadProcAttr OSThreadProc(void *);
+typedef void* OSThreadProcAttr OSThreadProc(void *);
extern int createOSThread ( OSThreadId* tid, char *name,
OSThreadProc *startProc, void *param);