Page MenuHomeFreeBSD

Use correct function declaration for yyerror
ClosedPublic

Authored by dg612_cam.ac.uk on Jun 2 2024, 12:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 11, 5:43 AM
Unknown Object (File)
Sat, Jun 8, 12:44 PM
Unknown Object (File)
Sat, Jun 8, 11:56 AM
Unknown Object (File)
Tue, Jun 4, 6:42 PM
Unknown Object (File)
Mon, Jun 3, 6:26 PM
Subscribers

Details

Summary

According to the POSIX standard yyerror should return int.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

POSIX standard states that yyerror() function supplied to the parser should have the int return type.
So I believe that instead of this patch, two other places in usr.sbin/config should be patched, that do use void.

dg612_cam.ac.uk edited the summary of this revision. (Show Details)

Updated to return int as suggested by @kib.

kib added inline comments.
usr.sbin/config/config.y
307

return (0);

This revision is now accepted and ready to land.Mon, Jun 3, 10:09 AM

Added parentheses around the returned value.

This revision now requires review to proceed.Mon, Jun 3, 10:26 AM
This revision is now accepted and ready to land.Mon, Jun 3, 1:45 PM

I can land this too, it looks perfect now.

This revision was automatically updated to reflect the committed changes.