summaryrefslogtreecommitdiff
path: root/compiler_and_linker/unsorted/CTemplateNew.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-01-20 00:39:43 +0000
committerAsh Wolf <ninji@wuffs.org>2023-01-20 00:39:43 +0000
commit7d986adf37220e1981a707745b784b078de4e3bc (patch)
tree831dea5f470c0c6b3c373f38d3a5f0354bc22600 /compiler_and_linker/unsorted/CTemplateNew.c
parent4d670146b4054e11e90227f96a3a1c66410e8d0b (diff)
downloadMWCC-7d986adf37220e1981a707745b784b078de4e3bc.tar.gz
MWCC-7d986adf37220e1981a707745b784b078de4e3bc.zip
fix various inaccuracies exposed by the mach ppc plugin
Diffstat (limited to 'compiler_and_linker/unsorted/CTemplateNew.c')
-rw-r--r--compiler_and_linker/unsorted/CTemplateNew.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler_and_linker/unsorted/CTemplateNew.c b/compiler_and_linker/unsorted/CTemplateNew.c
index fdbf194..9c94349 100644
--- a/compiler_and_linker/unsorted/CTemplateNew.c
+++ b/compiler_and_linker/unsorted/CTemplateNew.c
@@ -318,11 +318,10 @@ static UInt8 CTempl_GetTemplateNestIndex(NameSpace *nspace) {
return count;
}
-static TemplParam *CTempl_ParseParam(NameSpace *nspace, TemplParam *paramList, int index, UInt8 nindex) {
- TemplParam *param;
+static TemplParam *CTempl_ParseParam(NameSpace *nspace, TemplParam *param, UInt16 index, UInt8 nindex) {
DeclInfo di;
- short startToken;
SInt32 savedState;
+ short startToken;
param = galloc(sizeof(TemplParam));
memclrw(param, sizeof(TemplParam));
@@ -447,7 +446,7 @@ static TemplParam *CTempl_ParseParamList(NameSpace *nspace, UInt8 nindex) {
TemplParam **ptr;
TemplParam *param;
TemplParam *scan;
- int index;
+ UInt16 index;
params = NULL;
index = 0;
@@ -484,7 +483,7 @@ static TemplParam *CTempl_ParseParamList(NameSpace *nspace, UInt8 nindex) {
TemplArg *CTempl_ParseUncheckTemplArgs(TemplParam *params, Boolean is_global) {
TemplArg *args;
TemplArg *last;
- int index;
+ UInt16 index;
if (tk != '<') {
CError_Error(CErrorStr230);
@@ -988,7 +987,7 @@ static void CTempl_ParseConversionFunctionTemplate(DeclInfo *di, DeclFucker *wha
return;
}
- tclass->flags |= CLASS_FLAGS_40;
+ tclass->flags = tclass->flags | CLASS_FLAGS_40;
CError_QualifierCheck(di->qual & ~Q_INLINE);
conversion_type_name(di);