mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Fixed compiler warnings
This commit is contained in:
@@ -574,9 +574,6 @@ int kvm_init(int displayNo)
|
|||||||
{
|
{
|
||||||
char tmpBuff[1024];
|
char tmpBuff[1024];
|
||||||
sprintf_s(tmpBuff, sizeof(tmpBuff), "XOpenDisplay(%s) failed, using XAUTHORITY: %s", CURRENT_XDISPLAY, getenv("XAUTHORITY"));
|
sprintf_s(tmpBuff, sizeof(tmpBuff), "XOpenDisplay(%s) failed, using XAUTHORITY: %s", CURRENT_XDISPLAY, getenv("XAUTHORITY"));
|
||||||
//fprintf(logFile, "DisplayString=%s\n", displayString);
|
|
||||||
//fprintf(logFile, "XAUTHORITY is %s", getenv("XAUTHORITY")); fflush(logFile);
|
|
||||||
//fprintf(logFile, "Error calling XOpenDisplay()\n"); fflush(logFile);
|
|
||||||
kvm_send_error(tmpBuff);
|
kvm_send_error(tmpBuff);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
@@ -932,7 +929,6 @@ void* kvm_server_mainloop(void* parm)
|
|||||||
eventdisplay = NULL;
|
eventdisplay = NULL;
|
||||||
Display *imagedisplay = NULL, *cursordisplay = NULL;
|
Display *imagedisplay = NULL, *cursordisplay = NULL;
|
||||||
void *buf = NULL;
|
void *buf = NULL;
|
||||||
char displayString[256] = "";
|
|
||||||
int event_base = 0, error_base = 0, cursor_descriptor = -1;
|
int event_base = 0, error_base = 0, cursor_descriptor = -1;
|
||||||
ssize_t written;
|
ssize_t written;
|
||||||
XShmSegmentInfo shminfo;
|
XShmSegmentInfo shminfo;
|
||||||
@@ -944,7 +940,7 @@ void* kvm_server_mainloop(void* parm)
|
|||||||
fd_set writeset;
|
fd_set writeset;
|
||||||
XEvent XE;
|
XEvent XE;
|
||||||
|
|
||||||
unsigned short currentDisplayId;
|
unsigned short currentDisplayId = 0;
|
||||||
|
|
||||||
if (logFile) { fprintf(logFile, "Checking $DISPLAY\n"); fflush(logFile); }
|
if (logFile) { fprintf(logFile, "Checking $DISPLAY\n"); fflush(logFile); }
|
||||||
for (char **env = environ; *env; ++env)
|
for (char **env = environ; *env; ++env)
|
||||||
|
|||||||
@@ -3126,6 +3126,7 @@ ILibTransport_DoneState ILibStun_SendSctpPacket(struct ILibStun_Module *obj, int
|
|||||||
|
|
||||||
int ILibStun_AddSctpChunkHeader(char* buffer, int ptr, unsigned char chunktype, unsigned char chunkflags, unsigned short chunklength)
|
int ILibStun_AddSctpChunkHeader(char* buffer, int ptr, unsigned char chunktype, unsigned char chunkflags, unsigned short chunklength)
|
||||||
{
|
{
|
||||||
|
if (buffer == NULL) { ILIBCRITICALEXITMSG(255, "ILibStun_AddSctpChunkHeader() Invalid Parameter"); }
|
||||||
if (ptr >= 12 && ((int*)buffer)[0] == 0 && ((int*)buffer)[1] == 0)
|
if (ptr >= 12 && ((int*)buffer)[0] == 0 && ((int*)buffer)[1] == 0)
|
||||||
{
|
{
|
||||||
// This buffer contains a common buffer area, that has control flags
|
// This buffer contains a common buffer area, that has control flags
|
||||||
|
|||||||
Reference in New Issue
Block a user