diff --git a/go/native/GoGlue.h b/go/native/GoGlue.h index 810f41a93..ba97afd5b 100644 --- a/go/native/GoGlue.h +++ b/go/native/GoGlue.h @@ -47,10 +47,6 @@ void ZT_GoTap_deviceName(ZT_GoTap *tap,char nbuf[256]); void ZT_GoTap_setFriendlyName(ZT_GoTap *tap,const char *friendlyName); void ZT_GoTap_setMtu(ZT_GoTap *tap,unsigned int mtu); -int ZT_TestCrypto(); -int ZT_TestIdentity(); -int ZT_TestOther(); - #ifdef __cplusplus } #endif diff --git a/go/pkg/zerotier/address.go b/go/pkg/zerotier/address.go index 59d7ede80..e3fe60f2a 100644 --- a/go/pkg/zerotier/address.go +++ b/go/pkg/zerotier/address.go @@ -41,6 +41,7 @@ func NewAddressFromBytes(b []byte) (Address, error) { // Copy this address to a byte array, which must be 5 bytes in length or this will panic. func (a Address) CopyTo(b []byte) { + _ = b[4] b[0] = byte(a >> 32) b[1] = byte(a >> 24) b[2] = byte(a >> 16) diff --git a/go/pkg/zerotier/identity.go b/go/pkg/zerotier/identity.go index 1d7dd35de..e94958834 100644 --- a/go/pkg/zerotier/identity.go +++ b/go/pkg/zerotier/identity.go @@ -13,7 +13,7 @@ package zerotier -//#include "../../native/GoGlue.h" +// #include "../../native/GoGlue.h" import "C" import ( diff --git a/go/pkg/zerotier/node.go b/go/pkg/zerotier/node.go index 5465f64a1..424a558cc 100644 --- a/go/pkg/zerotier/node.go +++ b/go/pkg/zerotier/node.go @@ -13,10 +13,10 @@ package zerotier -//#cgo CFLAGS: -O3 -//#cgo darwin LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lc++ -lpthread -//#cgo linux android LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lstdc++ -lpthread -lm -//#include "../../native/GoGlue.h" +// #cgo CFLAGS: -O3 +// #cgo darwin LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lc++ -lpthread +// #cgo linux android LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lstdc++ -lpthread -lm +// #include "../../native/GoGlue.h" import "C" import ( diff --git a/go/pkg/zerotier/selftest.go b/go/pkg/zerotier/selftest.go deleted file mode 100644 index c992745f8..000000000 --- a/go/pkg/zerotier/selftest.go +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c)2013-2020 ZeroTier, Inc. - * - * Use of this software is governed by the Business Source License included - * in the LICENSE.TXT file in the project's root directory. - * - * Change Date: 2024-01-01 - * - * On the date above, in accordance with the Business Source License, use - * of this software will be governed by version 2.0 of the Apache License. - */ -/****/ - -package zerotier - -//#include "../../native/GoGlue.h" -import "C" - -// SelfTest runs a series of tests on the ZeroTier core and the Go service code, returning true on success. -// Results are sent to stdout. -func SelfTest() bool { - return true -} diff --git a/node/Dictionary.cpp b/node/Dictionary.cpp index cb3c071c1..389f54f2c 100644 --- a/node/Dictionary.cpp +++ b/node/Dictionary.cpp @@ -129,7 +129,7 @@ void Dictionary::encode(Vector &out) const for(Map< uint64_t,Vector >::const_iterator ti(m_entries.begin());ti != m_entries.end();++ti) { str[0] = ti->first; s_appendKey(out,reinterpret_cast(str)); - for(std::vector::const_iterator i(ti->second.begin());i!=ti->second.end();++i) + for(Vector::const_iterator i(ti->second.begin());i!=ti->second.end();++i) s_appendValueByte(out,*i); out.push_back((uint8_t)'\n'); } diff --git a/node/Topology.hpp b/node/Topology.hpp index f8008f966..01cedf230 100644 --- a/node/Topology.hpp +++ b/node/Topology.hpp @@ -25,7 +25,6 @@ #include "ScopedPtr.hpp" #include "Fingerprint.hpp" #include "Containers.hpp" -#include "PeerList.hpp" namespace ZeroTier {