In file included from ........\go\pkg\mod\github.com\karalabe\hid@v1.0.0\hid_enabled.go:40:
........\go\pkg\mod\github.com\karalabe\hid@v1.0.0/hidapi/windows/hid.c: In function 'hid_enumerate':
........\go\pkg\mod\github.com\karalabe\hid@v1.0.0/hidapi/windows/hid.c:431:5: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(cur_dev->path, str, len+1);
^~~~~~~~~~
........\go\pkg\mod\github.com\karalabe\hid@v1.0.0/hidapi/windows/hid.c:429:11: note: length computed here
len = strlen(str);
^~~
this a simple demo code:
linux cross compile for window:
windows cross compile for window:
How to resolve ? think you