Skip to content

Commit

Permalink
lint: unusedparams fixes for freebsd
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Apr 9, 2024
1 parent 055b1c5 commit ff37d8c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions executor/oci/spec_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ func withProcessArgs(args ...string) oci.SpecOpts {
return oci.WithProcessArgs(args...)
}

func generateMountOpts(resolvConf, hostsFile string) ([]oci.SpecOpts, error) {
func generateMountOpts(_, _ string) ([]oci.SpecOpts, error) {
return nil, nil
}

// generateSecurityOpts may affect mounts, so must be called after generateMountOpts
func generateSecurityOpts(mode pb.SecurityMode, apparmorProfile string, selinuxB bool) ([]oci.SpecOpts, error) {
func generateSecurityOpts(mode pb.SecurityMode, _ string, _ bool) ([]oci.SpecOpts, error) {
if mode == pb.SecurityMode_INSECURE {
return nil, errors.New("no support for running in insecure mode on FreeBSD")
}
Expand Down Expand Up @@ -49,7 +49,7 @@ func generateRlimitOpts(ulimits []*pb.Ulimit) ([]oci.SpecOpts, error) {
}

// tracing is not implemented on FreeBSD
func getTracingSocketMount(socket string) *specs.Mount {
func getTracingSocketMount(_ string) *specs.Mount {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions snapshot/diffapply_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/pkg/errors"
)

func (sn *mergeSnapshotter) diffApply(ctx context.Context, dest Mountable, diffs ...Diff) (_ snapshots.Usage, rerr error) {
func (sn *mergeSnapshotter) diffApply(_ context.Context, _ Mountable, _ ...Diff) (_ snapshots.Usage, rerr error) {
return snapshots.Usage{}, errors.New("diffApply not yet supported on FreeBSD")
}

func needsUserXAttr(ctx context.Context, sn Snapshotter, lm leases.Manager) (bool, error) {
func needsUserXAttr(_ context.Context, _ Snapshotter, _ leases.Manager) (bool, error) {
return false, errors.New("needs userxattr not supported on FreeBSD")
}
8 changes: 4 additions & 4 deletions util/network/cniprovider/createns_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import (
"github.com/pkg/errors"
)

func createNetNS(c *cniProvider, id string) (string, error) {
func createNetNS(_ *cniProvider, _ string) (string, error) {
return "", errors.New("creating netns for cni not supported")
}

func setNetNS(s *specs.Spec, nativeID string) error {
func setNetNS(_ *specs.Spec, _ string) error {
return errors.New("enabling netns for cni not supported")
}

func unmountNetNS(nativeID string) error {
func unmountNetNS(_ string) error {
return errors.New("unmounting netns for cni not supported")
}

func deleteNetNS(nativeID string) error {
func deleteNetNS(_ string) error {
return errors.New("deleting netns for cni not supported")
}

Expand Down

0 comments on commit ff37d8c

Please sign in to comment.