aboutsummaryrefslogtreecommitdiff
path: root/teccmd.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-13 20:05:54 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-21 20:49:37 +0300
commit278cc757b3146be68376318999415b97220c4d92 (patch)
treede44a0832bad1392f9b5347144a12af5c9039bf1 /teccmd.c
parent415ef16ae3b6b32652135a219b12a074dff265d9 (diff)
downloadvideoteco-fork-278cc757b3146be68376318999415b97220c4d92.tar.gz
silence some warnings when compiling under FreeBSD (and probably Linux)
Also avoid old-school function declarations without parameters (`void foo();`). This is unnecessarily loosing type safety.
Diffstat (limited to 'teccmd.c')
-rw-r--r--teccmd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/teccmd.c b/teccmd.c
index e6618db..bd0ea6c 100644
--- a/teccmd.c
+++ b/teccmd.c
@@ -522,7 +522,7 @@ int new_length;
ut->opcode = UNDO_C_SET_SEARCH_GLOBALS;
ut->iarg1 = last_search_pos1;
ut->iarg2 = last_search_pos2;
- ut->carg1 = (char *)last_search_status;
+ ut->carg1 = (char *)(uintptr_t)last_search_status;
/*
* If the new length is the same as the old length, there is a chance we are
@@ -1223,7 +1223,7 @@ register int status;
errno = EEXIST;
return(FAIL);
}/* End IF */
- sprintf(tmp_message,"?Error opening <%s>: %s",
+ snprintf(tmp_message,sizeof(tmp_message),"?Error opening <%s>: %s",
tmp_filename,error_text(errno));
error_message(tmp_message);
errno = 0;
@@ -1233,7 +1233,7 @@ register int status;
while(1){
i = read(fi,iobuf,IO_BUFFER_SIZE);
if(i < 0){
- sprintf(tmp_message,"?Error reading <%s>: %s",
+ snprintf(tmp_message,sizeof(tmp_message),"?Error reading <%s>: %s",
input_filename,error_text(errno));
error_message(tmp_message);
close(fo);
@@ -1243,7 +1243,7 @@ register int status;
status = write(fo,iobuf,(unsigned)i);
if(status < 0){
- sprintf(tmp_message,"?Error writing <%s>: %s",
+ snprintf(tmp_message,sizeof(tmp_message),"?Error writing <%s>: %s",
tmp_filename,error_text(errno));
error_message(tmp_message);
close(fo);