sz = snprintf(buffer, sizeof(buffer), "(gnuserv-eval '(resume-pid-console %d))",
(int)getpid());
- assert(sz>=0 && sz<sizeof(buffer));
+ assert(sz>=0 && (size_t)sz<sizeof(buffer));
send_string(s, buffer);
#ifdef SYSV_IPC
if (len > 0 && fullpath[len - 1] == '/') /* trailing slash already? */
; /* yep */
- else if (len < fullsize-1)
+ else if (len >=0 && (size_t)len < fullsize-1)
strcat(fullpath, "/"); /* nope, append trailing slash */
/* Don't forget to add the filename! */
strncat(fullpath, filename, fullsize-len-1);
#endif
sz = snprintf(command, sizeof(command), "(gnuserv-eval%s '(progn ",
quick ? "-quickly" : "");
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
send_string(s, command);
if (load_library) {
send_string(s, "(load-library ");
sz = snprintf(command, sizeof(command),
"(gnuserv-eval%s '(progn ",
quick ? "-quickly" : "");
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
send_string(s, command);
while ((nb = read(fileno(stdin), buffer, GSERV_BUFSZ - 1)) > 0) {
if (suppress_windows_system) {
char *term = getenv("TERM");
- int sz;
if (!term) {
fprintf(stderr, "%s: unknown terminal type\n",
progname);
"(gnuserv-edit-files '(tty %s %s %d) '(",
clean_string(tty), clean_string(term),
(int)getpid());
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
} else { /* !suppress_windows_system */
if (0) ;
#ifdef HAVE_X_WINDOWS
else if (display) {
- int sz = snprintf(command, sizeof(command),
- "(gnuserv-edit-files '(x %s) '(",
+ sz = snprintf(command, sizeof(command),
+ "(gnuserv-edit-files '(x %s) '(",
clean_string(display));
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
}
#endif
#ifdef HAVE_GTK
sz = snprintf(command, sizeof(command),
"(%d . %s)", starting_line,
clean_string(path));
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
send_string(s, command);
free(path);
} /* for */
|| (nofiles
&& !suppress_windows_system)) ? " 'quick" : "",
view ? " 'view" : "");
- assert(sz>=0 && sz<sizeof(command));
+ assert(sz>=0 && (size_t)sz<sizeof(command));
send_string(s, command);
send_string(s, ")");