Skip to content

Commit

Permalink
Make sure public functions parameters are unaffected by argument prom…
Browse files Browse the repository at this point in the history
…otion

In order for a prototype declaration and non-prototype function
definition to be compatible, the promoted type of the non-prototype
function parameters must be compatible with the type of the corresponding
prototype parameter.

Since funcs.h is autogenerated by mkfuncs.pl which copies the parameter
types as-is, use the promoted type in the definitions so that the types
are unaffected by default argument promotion.

Fixes gwsw#11
  • Loading branch information
michaelforney committed Jul 6, 2019
1 parent b10a608 commit 61a305e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charset.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ prutfchar(ch)
*/
public int
utf_len(ch)
unsigned char ch;
int ch;
{
if ((ch & 0x80) == 0)
return 1;
Expand Down
4 changes: 2 additions & 2 deletions line.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ flush_mbc_buf(pos)
*/
public int
pappend(c, pos)
unsigned char c;
int c;
POSITION pos;
{
int r;
Expand Down Expand Up @@ -1157,7 +1157,7 @@ pdone(endline, chopped, forw)
*/
public void
set_status_col(c)
char c;
int c;
{
set_linebuf(0, c, AT_NORMAL|AT_HILITE);
}
Expand Down

0 comments on commit 61a305e

Please sign in to comment.