Page MenuHomeFreeBSD

m4: Misc type and style fixes
Needs ReviewPublic

Authored by des on Tue, Mar 10, 12:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 18, 6:26 AM
Unknown Object (File)
Tue, Mar 17, 2:07 PM
Unknown Object (File)
Sun, Mar 15, 2:55 PM
Unknown Object (File)
Wed, Mar 11, 11:08 PM
Unknown Object (File)
Wed, Mar 11, 8:57 AM
Unknown Object (File)
Wed, Mar 11, 4:25 AM
Subscribers

Details

Reviewers
fuz
Summary

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71416
Build 68299: arc lint + arc unit

Event Timeline

des requested review of this revision.Tue, Mar 10, 12:18 PM
fuz requested changes to this revision.Sun, Mar 15, 3:49 PM
fuz added a subscriber: fuz.

I would get rid of the type changes, as I don't think they actually improve the code. The end_result change is wrong.

usr.bin/m4/expr.c
24

This is an external variable in parser.y, the type int32_t is correct. If at all, it should be adjusted to YYSTYPE after including parser.h.

35

Following style(9).

usr.bin/m4/extern.h
161 ↗(On Diff #173500)

I don't see the point of these type changes.

This revision now requires changes to proceed.Sun, Mar 15, 3:49 PM
fuz requested changes to this revision.Sun, Mar 15, 4:47 PM
fuz added inline comments.
usr.bin/m4/look.c
221

ohash_first takes a pointer to an unsigned int. This change is incorrect.

254

Same here.

usr.bin/m4/parser.y
21–22

This change makes it so that the type of an m4 expression is potentially platform dependent. Is this desired?

In particular, m4(1) documents that 32-bit arithmetic is used, so it should really stay int32_t.

This revision now requires changes to proceed.Sun, Mar 15, 4:47 PM
usr.bin/m4/expr.c
35

The first rule is to be consistent, and m4 consistently does not parenthesize its return values.

des marked an inline comment as done.Mon, Mar 16, 8:38 PM