Check-in [98264290ff]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix compiler warnings in libwebsockets, snap7, tkvlc, and tserialport
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:98264290ff0826152eebdc54fa8057208996928c
User & Date: chw 2019-03-16 17:01:46
Context
2019-03-18
18:47
more deterministic font loading in sdltk check-in: 79c43e287e user: chw tags: trunk
2019-03-16
17:44
merge with trunk check-in: 320f5f00ae user: chw tags: wtf-8-experiment
17:01
fix compiler warnings in libwebsockets, snap7, tkvlc, and tserialport check-in: 98264290ff user: chw tags: trunk
16:59
fix compiler warnings in tk check-in: 0c2181284c user: chw tags: trunk
Changes

Changes to undroid/libwebsockets/test-server/test-server-http.c.

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	unsigned char *end, *start;
	struct timeval tv;
	unsigned char *p;
#ifndef LWS_NO_CLIENT
	struct per_session_data__http *pss1;
	struct lws *wsi1;
#endif
	char buf[256];
	char b64[64];
	int n, m;
#ifdef EXTERNAL_POLL
	struct lws_pollargs *pa = (struct lws_pollargs *)in;
#endif









|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
	unsigned char *end, *start;
	struct timeval tv;
	unsigned char *p;
#ifndef LWS_NO_CLIENT
	struct per_session_data__http *pss1;
	struct lws *wsi1;
#endif
	char buf[512];
	char b64[64];
	int n, m;
#ifdef EXTERNAL_POLL
	struct lws_pollargs *pa = (struct lws_pollargs *)in;
#endif


Changes to undroid/snap7/src/core/s7_server.cpp.

1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
}
//==============================================================================
// FUNCTION SZL
//==============================================================================
void TS7Worker::SZLNotAvailable()
{
    SZL.Answer.Header.DataLen=SwapWord(sizeof(SZLNotAvail));
	SZL.ResParams->Err = 0x02D4;
    memcpy(SZL.ResData, &SZLNotAvail, sizeof(SZLNotAvail));
    isoSendBuffer(&SZL.Answer,26);
    SZL.SZLDone=false;
}
void TS7Worker::SZLSystemState()
{
    SZL.Answer.Header.DataLen=SwapWord(sizeof(SZLSysState));
    SZL.ResParams->Err =0x0000;
    memcpy(SZL.ResData,&SZLNotAvail,sizeof(SZLSysState));
    isoSendBuffer(&SZL.Answer,28);
	SZL.SZLDone=true;

}
void TS7Worker::SZLData(void *P, int len)
{
	int MaxSzl=FPDULength-22;

	if (len>MaxSzl) {
		len=MaxSzl;







|








|

|
<







1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254

1255
1256
1257
1258
1259
1260
1261
}
//==============================================================================
// FUNCTION SZL
//==============================================================================
void TS7Worker::SZLNotAvailable()
{
    SZL.Answer.Header.DataLen=SwapWord(sizeof(SZLNotAvail));
    SZL.ResParams->Err = 0x02D4;
    memcpy(SZL.ResData, &SZLNotAvail, sizeof(SZLNotAvail));
    isoSendBuffer(&SZL.Answer,26);
    SZL.SZLDone=false;
}
void TS7Worker::SZLSystemState()
{
    SZL.Answer.Header.DataLen=SwapWord(sizeof(SZLSysState));
    SZL.ResParams->Err =0x0000;
    memcpy(SZL.ResData,&SZLSysState,sizeof(SZLSysState));
    isoSendBuffer(&SZL.Answer,28);
    SZL.SZLDone=true;

}
void TS7Worker::SZLData(void *P, int len)
{
	int MaxSzl=FPDULength-22;

	if (len>MaxSzl) {
		len=MaxSzl;

Changes to undroid/tkvlc/generic/tkvlc.c.

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404

static void libVLChandler(const struct libvlc_event_t *ev, void *clientData)
{
  libVLCData *p = (libVLCData *) clientData;
  libVLCEvent *e;
  int type;

  if (p->exit_called == NULL) {
    return;
  }
  if (p->media_player == NULL) {
    return;
  }
  switch (ev->type) {
    case libvlc_MediaPlayerMediaChanged:







|







390
391
392
393
394
395
396
397
398
399
400
401
402
403
404

static void libVLChandler(const struct libvlc_event_t *ev, void *clientData)
{
  libVLCData *p = (libVLCData *) clientData;
  libVLCEvent *e;
  int type;

  if (p->exit_called) {
    return;
  }
  if (p->media_player == NULL) {
    return;
  }
  switch (ev->type) {
    case libvlc_MediaPlayerMediaChanged:

Changes to undroid/tserialport/libserialport/linux.c.

30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	 */
	char description[128];
	int bus, address;
	unsigned int vid, pid;
	char manufacturer[128], product[128], serial[128];
	char baddr[32];
	const char dir_name[] = "/sys/class/tty/%s/device/%s%s";
	char sub_dir[32] = "", file_name[PATH_MAX];
	char *ptr, *dev = port->name + 5;
	FILE *file;
	int i, count;
	struct stat statbuf;

	if (strncmp(port->name, "/dev/", 5))
		RETURN_ERROR(SP_ERR_ARG, "Device name not recognized");

	snprintf(file_name, sizeof(file_name), "/sys/class/tty/%s", dev);
	if (lstat(file_name, &statbuf) == -1)
		RETURN_ERROR(SP_ERR_ARG, "Device not found");
	if (!S_ISLNK(statbuf.st_mode))
		snprintf(file_name, sizeof(file_name), "/sys/class/tty/%s/device", dev);
	count = readlink(file_name, file_name, sizeof(file_name));
	if (count <= 0 || count >= (int)(sizeof(file_name) - 1))
		RETURN_ERROR(SP_ERR_ARG, "Device not found");
	file_name[count] = 0;
	if (strstr(file_name, "bluetooth"))
		port->transport = SP_TRANSPORT_BLUETOOTH;
	else if (strstr(file_name, "usb"))
		port->transport = SP_TRANSPORT_USB;







|








|
|


|
|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
	 */
	char description[128];
	int bus, address;
	unsigned int vid, pid;
	char manufacturer[128], product[128], serial[128];
	char baddr[32];
	const char dir_name[] = "/sys/class/tty/%s/device/%s%s";
	char sub_dir[32] = "", file_name0[PATH_MAX], file_name[PATH_MAX];
	char *ptr, *dev = port->name + 5;
	FILE *file;
	int i, count;
	struct stat statbuf;

	if (strncmp(port->name, "/dev/", 5))
		RETURN_ERROR(SP_ERR_ARG, "Device name not recognized");

	snprintf(file_name0, sizeof(file_name0), "/sys/class/tty/%s", dev);
	if (lstat(file_name0, &statbuf) == -1)
		RETURN_ERROR(SP_ERR_ARG, "Device not found");
	if (!S_ISLNK(statbuf.st_mode))
		snprintf(file_name0, sizeof(file_name0), "/sys/class/tty/%s/device", dev);
	count = readlink(file_name0, file_name, sizeof(file_name));
	if (count <= 0 || count >= (int)(sizeof(file_name) - 1))
		RETURN_ERROR(SP_ERR_ARG, "Device not found");
	file_name[count] = 0;
	if (strstr(file_name, "bluetooth"))
		port->transport = SP_TRANSPORT_BLUETOOTH;
	else if (strstr(file_name, "usb"))
		port->transport = SP_TRANSPORT_USB;