Skip to content

Fix GitHub lint: discard Munmap's error explicitly in data_read (#589) - #589

Closed
ESoapW wants to merge 1 commit into
meta:mainfrom
ESoapW:export-D127204480
Closed

ESoapW wants to merge 1 commit into
meta:mainfrom
ESoapW:export-D127204480

Conversation

@ESoapW

@ESoapW ESoapW commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

facebook/time's GitHub lint job fails on the exported D124865748:

fbclock/data_read.go:122:19: Error return value of unix.Munmap is not checked (errcheck)

The deferred Munmap only drops a read-only mapping after the snapshot is copied, so there's nothing to do with its error. This discards it explicitly, as shmem_notlinux.go's deferred Munmaps do.

Internal lint doesn't report it: arc lint, extra linters included, passes on the unchanged line.

Differential Revision: D127204480

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 23, 2026
@meta-codesync

meta-codesync Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

@ESoapW has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127204480.

…#589)

Summary:

facebook/time's GitHub lint job fails on the exported D124865748:

  fbclock/data_read.go:122:19: Error return value of `unix.Munmap` is not checked (errcheck)

The deferred Munmap only drops a read-only mapping after the snapshot is copied, so there's nothing to do with its error. This discards it explicitly, as shmem_notlinux.go's deferred Munmaps do.

Internal lint doesn't report it: arc lint, extra linters included, passes on the unchanged line.

Differential Revision: D127204480
@meta-codesync meta-codesync Bot changed the title Fix GitHub lint: discard Munmap's error explicitly in data_read Fix GitHub lint: discard Munmap's error explicitly in data_read (#589) Oct 23, 2026
@ESoapW
ESoapW force-pushed the export-D127204480 branch from 0da1525 to 7cb2766 Compare October 23, 2026 18:34
@meta-codesync meta-codesync Bot closed this in 70873ed Oct 23, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 23, 2026
@meta-codesync

meta-codesync Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 70873ed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant