Skip to content

Commit

Permalink
Merging branch/2023-01-06/gcc-11.3.0-warnings for GitHub pull request…
Browse files Browse the repository at this point in the history
… 92 <#92>.
  • Loading branch information
rptb1 committed Jan 16, 2023
2 parents 43a856c + 18e22cd commit 5eacd32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion code/poolams.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static void AMSSegsDestroy(AMS ams)

/* AMSVarargs -- decode obsolete varargs */

static void AMSVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
static void AMSVarargs(ArgStruct args[MPS_ARGS_MAX - 1], va_list varargs)
{
args[0].key = MPS_KEY_FORMAT;
args[0].val.format = va_arg(varargs, Format);
Expand All @@ -756,6 +756,7 @@ static void AMSVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
args[2].key = MPS_KEY_AMS_SUPPORT_AMBIGUOUS;
args[2].val.b = va_arg(varargs, Bool);
args[3].key = MPS_KEY_ARGS_END;
AVER(MPS_ARGS_MAX - 1 > 3);
AVERT(ArgList, args);
}

Expand Down
3 changes: 2 additions & 1 deletion code/poolmvff.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ static Res MVFFBufferFill(Addr *baseReturn, Addr *limitReturn,

/* MVFFVarargs -- decode obsolete varargs */

static void MVFFVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
static void MVFFVarargs(ArgStruct args[MPS_ARGS_MAX - 1], va_list varargs)
{
args[0].key = MPS_KEY_EXTEND_BY;
args[0].val.size = va_arg(varargs, Size);
Expand All @@ -379,6 +379,7 @@ static void MVFFVarargs(ArgStruct args[MPS_ARGS_MAX], va_list varargs)
args[5].key = MPS_KEY_MVFF_FIRST_FIT;
args[5].val.b = va_arg(varargs, Bool);
args[6].key = MPS_KEY_ARGS_END;
AVER(MPS_ARGS_MAX - 1 > 6);
AVERT(ArgList, args);
}

Expand Down

0 comments on commit 5eacd32

Please sign in to comment.