#define USBRL_CALL __cdecl
#define USBRL_API __declspec(dllexport) USBRL_CALL
+#if _MSC_VER < 1900 /* before VS2015 */
#define snprintf _snprintf
+#endif /* VS2015 */
#endif // _MSC_VER
#endif //WIN32
// Globals
-const char *g_dummyPath = "NOTHING"; // passing dev.path to client not implemented, I return this as path.
+static const char *g_dummyPath = "NOTHING"; // passing dev.path to client not implemented, I return this as path.
static const char *usbErrorMessage(int errCode)
{
int err;
char buffer[128*sizeof(short)]; // max USB string is 128 UTF-16 chars
int num = 0;
- int i;
+ size_t i;
struct usbrelay_internal_s *q;
struct enumctx_s *ectx = (struct enumctx_s *)context;
goto next;
}
- i = (int)strlen(buffer);
+ i = strlen(buffer);
if ( i != strlen(productName) + 1 )
{
goto next;
ectx->tail =q;
} else {
ectx->tail->urdi.next = (pusb_relay_device_info_t)q;
+ ectx->tail = q;
}
++ectx->numdevs;
int err;
char buffer[128*sizeof(short)]; // max USB string is 128 UTF-16 chars
int num = 0;
- int i;
+ size_t i;
struct enumctx_s *ectx = (struct enumctx_s *)context;
struct usbrelay_internal_s *q = ectx->head;