--- freem/src/routine.c 2025/03/27 03:27:35 1.4 +++ freem/src/routine.c 2025/04/13 04:22:43 1.6 @@ -1,5 +1,5 @@ /* - * $Id: routine.c,v 1.4 2025/03/27 03:27:35 snw Exp $ + * $Id: routine.c,v 1.6 2025/04/13 04:22:43 snw Exp $ * Routine buffer management * * @@ -24,6 +24,12 @@ * along with FreeM. If not, see . * * $Log: routine.c,v $ + * Revision 1.6 2025/04/13 04:22:43 snw + * Fix snprintf calls + * + * Revision 1.5 2025/04/09 19:52:02 snw + * Eliminate as many warnings as possible while building with -Wall + * * Revision 1.4 2025/03/27 03:27:35 snw * Install init scripts to share/freem/examples/init and fix regression in method dispatch * @@ -256,7 +262,7 @@ short rtn_get_path(char *rou, char *buf) stcnv_m2c (pth); } - snprintf (buf, PATHLEN, "%s/%s.m", pth, rou); + snprintf (buf, PATHLEN - 1, "%s/%s.m", pth, rou); if ((fp = fopen (buf, "r")) != NULL) { (void) fclose (fp); @@ -313,7 +319,6 @@ m_entry *rtn_get_entries(char *rou) char cur_label[255]; int has_args = 0; char *paren_pos; - char *curarg; if (rtn_get_path (rou, rou_path) == FALSE) { return (m_entry *) NULL;