]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/visbuf.c
ncurses 5.9 - patch 20111022
[ncurses.git] / ncurses / trace / visbuf.c
index 7456ac55e6c9982eef8a97f40bcf93984a1b3c6e..6922d3e2061662e19e78f24e8911e5ad20b085aa 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 2001-2010,2011 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 #include <tic.h>
 #include <ctype.h>
 
-MODULE_ID("$Id: visbuf.c,v 1.36 2010/05/01 20:44:34 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.38 2011/10/22 16:34:50 tom Exp $")
 
 #define NUM_VISBUFS 4
 
@@ -94,7 +94,7 @@ _nc_vischar(char *tp, unsigned c)
 static const char *
 _nc_visbuf2n(int bufnum, const char *buf, int len)
 {
-    const char *vbuf;
+    const char *vbuf = 0;
     char *tp;
     int c;
 
@@ -261,7 +261,7 @@ _nc_viswibuf(const wint_t *buf)
 NCURSES_EXPORT(const char *)
 _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len)
 {
-    char *result = _nc_trace_buf(bufnum, BUFSIZ);
+    char *result = _nc_trace_buf(bufnum, (size_t) BUFSIZ);
     int first;
     const char *found;