]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ncurses.c
ncurses 5.9 - patch 20140118
[ncurses.git] / test / ncurses.c
index e34c54aca5684d66852dcef6d6335d0870872260..cb806673b31b3f3ecc62ba5684543749b36c0c6d 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.392 2013/08/31 20:47:55 tom Exp $
+$Id: ncurses.c,v 1.396 2013/11/23 21:43:51 tom Exp $
 
 ***************************************************************************/
 
@@ -1731,7 +1731,7 @@ wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const cha
        attr_t old_attr = 0;
        short old_pair = 0;
 
-       (void) attr_get(&old_attr, &old_pair, 0);
+       (void) (attr_get) (&old_attr, &old_pair, 0);
        (void) attr_set(attr, pair, 0);
        addwstr(wide_attr_test_string);
        (void) attr_set(old_attr, old_pair, 0);
@@ -2851,7 +2851,7 @@ slk_test(void)
            MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
            strcpy(buf, "");
            if ((s = slk_label(c - '0')) != 0) {
-               strncpy(buf, s, 8);
+               strncpy(buf, s, (size_t) 8);
            }
            wGetstring(stdscr, buf, 8);
            slk_set((c - '0'), buf, fmt);
@@ -3071,7 +3071,7 @@ show_256_chars(int repeat, attr_t attr, short pair)
     for (code = first; code <= last; ++code) {
        int row = (int) (2 + (code / 16));
        int col = (int) (5 * (code % 16));
-       mvaddch(row, col, colored_chtype(code, attr, pair));
+       IGNORE_RC(mvaddch(row, col, colored_chtype(code, attr, pair)));
        for (count = 1; count < repeat; ++count) {
            addch(colored_chtype(code, attr, pair));
        }
@@ -4348,7 +4348,7 @@ acs_and_scroll(void)
        transient((FRAME *) 0, (char *) 0);
        switch (c) {
        case CTRL('C'):
-           if ((neww = typeCalloc(FRAME, 1)) == 0) {
+           if ((neww = typeCalloc(FRAME, (size_t) 1)) == 0) {
                failed("acs_and_scroll");
                goto breakout;
            }
@@ -4430,7 +4430,7 @@ acs_and_scroll(void)
            if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
                transient(current, "Can't open screen dump file");
            } else {
-               if ((neww = typeCalloc(FRAME, 1)) != 0) {
+               if ((neww = typeCalloc(FRAME, (size_t) 1)) != 0) {
 
                    neww->next = current ? current->next : 0;
                    neww->last = current;
@@ -5822,13 +5822,13 @@ edit_secure(FIELD * me, int c)
        size_t have = (source ? strlen(source) : 0) + 1;
        size_t need = 80 + have;
        char *temp = malloc(need);
-       long len;
+       size_t len;
 
        if (temp != 0) {
            strncpy(temp, source ? source : "", have + 1);
-           len = (long) (char *) field_userptr(me);
+           len = (size_t) (char *) field_userptr(me);
            if (c <= KEY_MAX) {
-               if (isgraph(c) && (len + 1) < (int) sizeof(temp)) {
+               if (isgraph(c) && (len + 1) < sizeof(temp)) {
                    temp[len++] = (char) c;
                    temp[len] = 0;
                    set_field_buffer(me, 1, temp);
@@ -6792,7 +6792,7 @@ main_menu(bool top)
        command = 0;
        for (;;) {
            char ch = '\0';
-           if (read(fileno(stdin), &ch, 1) <= 0) {
+           if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
                if (command == 0)
                    command = 'q';
                break;