Skip to content

Commit

Permalink
make lint and linux happy
Browse files Browse the repository at this point in the history
NOTE: Do not use go1.17.7 - some tests will fail because of reversed
      array member order.
Also GO seems to be a little bit more picky on Linux as on Solaris...
  • Loading branch information
jelmd committed May 9, 2022
1 parent c623f49 commit 7f3fa70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ clean:

DOLLAR := '$$'

ELFEDIT ?= $(shell test `uname -s` = SunOS && printf /usr/bin/elfedit || printf true )

generator: *.go
go build -trimpath -ldflags '-extldflags -zignore' -ldflags '-extldflags -zdefs'
ADDR=`/usr/bin/elfedit -e 'dyn:runpath -o num' generator` && \
/usr/bin/elfedit -e "str:set -shnam .dynstr -strndx $$ADDR $(DOLLAR)ORIGIN:$(DOLLAR)ORIGIN/../lib/amd64" generator
ADDR=`$(ELFEDIT) -e 'dyn:runpath -o num' generator` && \
$(ELFEDIT) -e "str:set -shnam .dynstr -strndx $$ADDR $(DOLLAR)ORIGIN:$(DOLLAR)ORIGIN/../lib/amd64" generator

generate: generator mibs
MIBDIRS=$(MIB_PATH) ./generator --fail-on-parse-errors generate
Expand Down
2 changes: 1 addition & 1 deletion generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func generateConfig(nodes *Node, nameToNode map[string]*Node, logger log.Logger)
return fmt.Errorf("error parsing generated config: %s", err)
}
annotateOIDs(&node, nameToNode)
out, err = yaml.Marshal(&node)
out, _ = yaml.Marshal(&node)

// Check the generated config to catch auth/version issues.
err = yaml.Unmarshal(out, &config.Config{})
Expand Down

0 comments on commit 7f3fa70

Please sign in to comment.