Skip to content

Commit

Permalink
Merge pull request #158 from josephlr/cgo
Browse files Browse the repository at this point in the history
Fix CGO warnings and add CI checks to prevent regression
  • Loading branch information
alexmwu authored Jan 26, 2022
2 parents 02925fa + 51ca914 commit 938e4fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ jobs:
uses: actions/checkout@v2
- name: Install Linux packages
run: sudo apt-get -y install libssl-dev libtspi-dev
- name: Check for CGO Warnings (gcc)
run: CGO_CFLAGS=-Werror CC=gcc go build ./...
- name: Check for CGO Warnings (clang)
run: CGO_CFLAGS=-Werror CC=clang go build ./...
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion simulator/internal/internal_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package internal
// // Windows has linking errors when using stack protectors
// #cgo !windows CFLAGS: -fstack-protector-all
// // Silence known warnings from the reference code and CGO code.
// #cgo CFLAGS: -Wno-missing-braces -Wno-empty-body -Wno-unused-variable -Wno-maybe-uninitialized
// #cgo CFLAGS: -Wno-missing-braces -Wno-empty-body -Wno-unused-variable -Wno-uninitialized
// // Link against the system OpenSSL
// #cgo CFLAGS: -DDEBUG=YES
// #cgo CFLAGS: -DSIMULATION=NO
Expand Down

0 comments on commit 938e4fa

Please sign in to comment.