Debian Codegraph @

debian/patches/Make-function-pointer-types-consistent-with-the-implement.patch

raw
1 From: Simon McVittie <[email protected]>
2 Date: Thu, 1 Aug 2024 08:45:33 +0100
3 Subject: Make function pointer types consistent with the implementation
4
5 Mismatched function pointer types are treated as an error by gcc 14:
6
7 qccmain.c: In function 'QCC_main':
8 qccmain.c:2733:19: error: assignment to 'void * (*)(hashtable_t *, char *)' {aka 'void * (*)(struct hashtable_s *, char *)'} from incompatible pointer type 'void * (*)(hashtable_t *, const char *)' {aka 'void * (*)(struct hashtable_s *, const char *)'} [-Wincompatible-pointer-types]
9 2733 | pHash_Get = &Hash_Get;
10
11 Bug-Debian: https://bugs.debian.org/1074971
12 Signed-off-by: Simon McVittie <[email protected]>
13 ---
14 qcc.h | 2 +-
15 qcc_pr_comp.c | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18 diff --git a/qcc.h b/qcc.h
19 index 9579613..47a0256 100644
20 --- a/qcc.h
21 +++ b/qcc.h
22 @@ -914,6 +914,6 @@ char *TypeName(QCC_type_t *type);
23 void QCC_PR_IncludeChunk (char *data, pbool duplicate, char *filename);
24 void QCC_PR_IncludeChunkEx(char *data, pbool duplicate, char *filename, CompilerConstant_t *cnst);
25 pbool QCC_PR_UnInclude(void);
26 -extern void *(*pHash_Get)(hashtable_t *table, char *name);
27 +extern void *(*pHash_Get)(hashtable_t *table, const char *name);
28 extern void *(*pHash_GetNext)(hashtable_t *table, char *name, void *old);
29 extern void *(*pHash_Add)(hashtable_t *table, char *name, void *data, bucket_t *);
30 diff --git a/qcc_pr_comp.c b/qcc_pr_comp.c
31 index 40020f6..93ceda3 100644
32 --- a/qcc_pr_comp.c
33 +++ b/qcc_pr_comp.c
34 @@ -124,7 +124,7 @@ int optres_logicops;
35 int optres_test1;
36 int optres_test2;
37
38 -void *(*pHash_Get)(hashtable_t *table, char *name);
39 +void *(*pHash_Get)(hashtable_t *table, const char *name);
40 void *(*pHash_GetNext)(hashtable_t *table, char *name, void *old);
41 void *(*pHash_Add)(hashtable_t *table, char *name, void *data, bucket_t *);
42