Commit 4c9eaec1262e1777679818a67542c172f8b426bf

Authored by Perry Werneck
1 parent 59c01e65

Fixing build on OpenSUSE Factory & Tumbleweed.

src/lib3270/ansi.c
... ... @@ -493,13 +493,13 @@ static int dbcs_process(H3270 *hSession, int ch, unsigned char ebc[]);
493 493 static void ansi_scroll(H3270 *hSession);
494 494  
495 495 static enum lib3270_ansi_state
496   -ansi_data_mode(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  496 +ansi_data_mode(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
497 497 {
498 498 return DATA;
499 499 }
500 500  
501 501 static enum lib3270_ansi_state
502   -dec_save_cursor(H3270 *hSession, int ig1 unused, int ig2 unused)
  502 +dec_save_cursor(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
503 503 {
504 504 int i;
505 505  
... ... @@ -513,7 +513,7 @@ dec_save_cursor(H3270 *hSession, int ig1 unused, int ig2 unused)
513 513 return DATA;
514 514 }
515 515  
516   -static enum lib3270_ansi_state dec_restore_cursor(H3270 *hSession, int ig1 unused, int ig2 unused)
  516 +static enum lib3270_ansi_state dec_restore_cursor(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
517 517 {
518 518 int i;
519 519  
... ... @@ -528,7 +528,7 @@ static enum lib3270_ansi_state dec_restore_cursor(H3270 *hSession, int ig1 unuse
528 528 return DATA;
529 529 }
530 530  
531   -static enum lib3270_ansi_state ansi_newline(H3270 *hSession, int ig1 unused, int ig2 unused)
  531 +static enum lib3270_ansi_state ansi_newline(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
532 532 {
533 533 int nc;
534 534  
... ... @@ -545,7 +545,7 @@ static enum lib3270_ansi_state ansi_newline(H3270 *hSession, int ig1 unused, int
545 545 }
546 546  
547 547 static enum lib3270_ansi_state
548   -ansi_cursor_up(H3270 *hSession, int nn, int ig2 unused)
  548 +ansi_cursor_up(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
549 549 {
550 550 int rr;
551 551  
... ... @@ -561,7 +561,7 @@ ansi_cursor_up(H3270 *hSession, int nn, int ig2 unused)
561 561 }
562 562  
563 563 static enum lib3270_ansi_state
564   -ansi_esc2(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  564 +ansi_esc2(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
565 565 {
566 566 register int i;
567 567  
... ... @@ -571,7 +571,7 @@ ansi_esc2(H3270 *hSession unused, int ig1 unused, int ig2 unused)
571 571 return N1;
572 572 }
573 573  
574   -static enum lib3270_ansi_state ansi_reset(H3270 *hSession, int ig1 unused, int ig2 unused)
  574 +static enum lib3270_ansi_state ansi_reset(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
575 575 {
576 576 int i;
577 577 // static Boolean first = True;
... ... @@ -627,7 +627,7 @@ static enum lib3270_ansi_state ansi_reset(H3270 *hSession, int ig1 unused, int i
627 627 }
628 628  
629 629 static enum lib3270_ansi_state
630   -ansi_insert_chars(H3270 *hSession, int nn, int ig2 unused)
  630 +ansi_insert_chars(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
631 631 {
632 632 int cc = hSession->cursor_addr % hSession->cols; /* current col */
633 633 int mc = hSession->cols - cc; /* max chars that can be inserted */
... ... @@ -649,7 +649,7 @@ ansi_insert_chars(H3270 *hSession, int nn, int ig2 unused)
649 649 }
650 650  
651 651 static enum lib3270_ansi_state
652   -ansi_cursor_down(H3270 *hSession, int nn, int ig2 unused)
  652 +ansi_cursor_down(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
653 653 {
654 654 int rr;
655 655  
... ... @@ -664,8 +664,7 @@ ansi_cursor_down(H3270 *hSession, int nn, int ig2 unused)
664 664 return DATA;
665 665 }
666 666  
667   -static enum lib3270_ansi_state
668   -ansi_cursor_right(H3270 *hSession, int nn, int ig2 unused)
  667 +static enum lib3270_ansi_state ansi_cursor_right(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
669 668 {
670 669 int cc;
671 670  
... ... @@ -682,7 +681,7 @@ ansi_cursor_right(H3270 *hSession, int nn, int ig2 unused)
682 681 }
683 682  
684 683 static enum lib3270_ansi_state
685   -ansi_cursor_left(H3270 *hSession, int nn, int ig2 unused)
  684 +ansi_cursor_left(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
686 685 {
687 686 int cc;
688 687  
... ... @@ -715,7 +714,7 @@ ansi_cursor_motion(H3270 *hSession, int n1, int n2)
715 714 }
716 715  
717 716 static enum lib3270_ansi_state
718   -ansi_erase_in_display(H3270 *hSession, int nn, int ig2 unused)
  717 +ansi_erase_in_display(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
719 718 {
720 719 switch (nn) {
721 720 case 0: /* below */
... ... @@ -733,7 +732,7 @@ ansi_erase_in_display(H3270 *hSession, int nn, int ig2 unused)
733 732 }
734 733  
735 734 static enum lib3270_ansi_state
736   -ansi_erase_in_line(H3270 *hSession, int nn, int ig2 unused)
  735 +ansi_erase_in_line(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
737 736 {
738 737 int nc = hSession->cursor_addr % hSession->cols;
739 738  
... ... @@ -752,7 +751,7 @@ ansi_erase_in_line(H3270 *hSession, int nn, int ig2 unused)
752 751 }
753 752  
754 753 static enum lib3270_ansi_state
755   -ansi_insert_lines(H3270 *hSession, int nn, int ig2 unused)
  754 +ansi_insert_lines(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
756 755 {
757 756 int rr = hSession->cursor_addr / hSession->cols; /* current row */
758 757 int mr = hSession->scroll_bottom - rr; /* rows left at and below this one */
... ... @@ -778,7 +777,7 @@ ansi_insert_lines(H3270 *hSession, int nn, int ig2 unused)
778 777 }
779 778  
780 779 static enum lib3270_ansi_state
781   -ansi_delete_lines(H3270 *hSession, int nn, int ig2 unused)
  780 +ansi_delete_lines(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
782 781 {
783 782 int rr = hSession->cursor_addr / hSession->cols; /* current row */
784 783 int mr = hSession->scroll_bottom - rr; /* max rows that can be deleted */
... ... @@ -804,7 +803,7 @@ ansi_delete_lines(H3270 *hSession, int nn, int ig2 unused)
804 803 }
805 804  
806 805 static enum lib3270_ansi_state
807   -ansi_delete_chars(H3270 *hSession, int nn, int ig2 unused)
  806 +ansi_delete_chars(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
808 807 {
809 808 int cc = hSession->cursor_addr % hSession->cols; /* current col */
810 809 int mc = hSession->cols - cc; /* max chars that can be deleted */
... ... @@ -826,7 +825,7 @@ ansi_delete_chars(H3270 *hSession, int nn, int ig2 unused)
826 825 }
827 826  
828 827 static enum lib3270_ansi_state
829   -ansi_sgr(H3270 *hSession, int ig1 unused, int ig2 unused)
  828 +ansi_sgr(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
830 829 {
831 830 int i;
832 831  
... ... @@ -925,19 +924,19 @@ ansi_sgr(H3270 *hSession, int ig1 unused, int ig2 unused)
925 924 }
926 925  
927 926 static enum lib3270_ansi_state
928   -ansi_bell(H3270 *hSession, int ig1 unused, int ig2 unused)
  927 +ansi_bell(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
929 928 {
930 929 lib3270_ring_bell(hSession);
931 930 return DATA;
932 931 }
933 932  
934   -static enum lib3270_ansi_state ansi_newpage(H3270 *hSession, int ig1 unused, int ig2 unused)
  933 +static enum lib3270_ansi_state ansi_newpage(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
935 934 {
936 935 ctlr_clear(hSession,False);
937 936 return DATA;
938 937 }
939 938  
940   -static enum lib3270_ansi_state ansi_backspace(H3270 *hSession, int ig1 unused, int ig2 unused)
  939 +static enum lib3270_ansi_state ansi_backspace(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
941 940 {
942 941 if (hSession->held_wrap)
943 942 {
... ... @@ -958,8 +957,7 @@ static enum lib3270_ansi_state ansi_backspace(H3270 *hSession, int ig1 unused, i
958 957 return DATA;
959 958 }
960 959  
961   -static enum lib3270_ansi_state
962   -ansi_cr(H3270 *hSession, int ig1 unused, int ig2 unused)
  960 +static enum lib3270_ansi_state ansi_cr(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
963 961 {
964 962 if (hSession->cursor_addr % hSession->cols)
965 963 cursor_move(hSession,hSession->cursor_addr - (hSession->cursor_addr % hSession->cols));
... ... @@ -971,14 +969,13 @@ ansi_cr(H3270 *hSession, int ig1 unused, int ig2 unused)
971 969 return DATA;
972 970 }
973 971  
974   -static enum lib3270_ansi_state
975   -ansi_lf(H3270 *hSession, int ig1 unused, int ig2 unused)
  972 +static enum lib3270_ansi_state ansi_lf(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
976 973 {
977 974 int nc = hSession->cursor_addr + hSession->cols;
978 975  
979 976 hSession->held_wrap = 0;
980 977  
981   - /* If we're below the scrolling region, don't scroll. */
  978 + // If we're below the scrolling region, don't scroll.
982 979 if((hSession->cursor_addr / hSession->cols) >= hSession->scroll_bottom)
983 980 {
984 981 if (nc < hSession->rows * hSession->cols)
... ... @@ -993,8 +990,7 @@ ansi_lf(H3270 *hSession, int ig1 unused, int ig2 unused)
993 990 return DATA;
994 991 }
995 992  
996   -static enum lib3270_ansi_state
997   -ansi_htab(H3270 *hSession, int ig1 unused, int ig2 unused)
  993 +static enum lib3270_ansi_state ansi_htab(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
998 994 {
999 995 int col = hSession->cursor_addr % hSession->cols;
1000 996 int i;
... ... @@ -1009,14 +1005,12 @@ ansi_htab(H3270 *hSession, int ig1 unused, int ig2 unused)
1009 1005 return DATA;
1010 1006 }
1011 1007  
1012   -static enum lib3270_ansi_state
1013   -ansi_escape(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1008 +static enum lib3270_ansi_state ansi_escape(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1014 1009 {
1015 1010 return ESC;
1016 1011 }
1017 1012  
1018   -static enum lib3270_ansi_state
1019   -ansi_nop(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1013 +static enum lib3270_ansi_state ansi_nop(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1020 1014 {
1021 1015 return DATA;
1022 1016 }
... ... @@ -1036,7 +1030,7 @@ ansi_nop(H3270 *hSession unused, int ig1 unused, int ig2 unused)
1036 1030 }
1037 1031  
1038 1032 static enum lib3270_ansi_state
1039   -ansi_printing(H3270 *hSession, int ig1 unused, int ig2 unused)
  1033 +ansi_printing(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1040 1034 {
1041 1035 int nc;
1042 1036 unsigned char ebc_ch;
... ... @@ -1215,8 +1209,7 @@ ansi_printing(H3270 *hSession, int ig1 unused, int ig2 unused)
1215 1209 return DATA;
1216 1210 }
1217 1211  
1218   -static enum lib3270_ansi_state
1219   -ansi_multibyte(H3270 *hSession, int ig1, int ig2)
  1212 +static enum lib3270_ansi_state ansi_multibyte(H3270 *hSession, int ig1, int ig2)
1220 1213 {
1221 1214 char mbs[MB_MAX];
1222 1215 unsigned char ch;
... ... @@ -1267,8 +1260,7 @@ ansi_multibyte(H3270 *hSession, int ig1, int ig2)
1267 1260 return (*fn)(hSession,n[0], n[1]);
1268 1261 }
1269 1262  
1270   -static enum lib3270_ansi_state
1271   -ansi_semicolon(H3270 *hSession, int ig1 unused, int ig2 unused)
  1263 +static enum lib3270_ansi_state ansi_semicolon(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1272 1264 {
1273 1265 if (nx >= NN)
1274 1266 return DATA;
... ... @@ -1276,15 +1268,13 @@ ansi_semicolon(H3270 *hSession, int ig1 unused, int ig2 unused)
1276 1268 return hSession->state;
1277 1269 }
1278 1270  
1279   -static enum lib3270_ansi_state
1280   -ansi_digit(H3270 *hSession, int ig1 unused, int ig2 unused)
  1271 +static enum lib3270_ansi_state ansi_digit(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1281 1272 {
1282 1273 n[nx] = (n[nx] * 10) + (hSession->ansi_ch - '0');
1283 1274 return hSession->state;
1284 1275 }
1285 1276  
1286   -static enum lib3270_ansi_state
1287   -ansi_reverse_index(H3270 *hSession, int ig1 unused, int ig2 unused)
  1277 +static enum lib3270_ansi_state ansi_reverse_index(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1288 1278 {
1289 1279 int rr = hSession->cursor_addr / hSession->cols; /* current row */
1290 1280 int np = (hSession->scroll_top - 1) - rr; /* number of rows in the scrolling region, above this line */
... ... @@ -1318,21 +1308,19 @@ ansi_reverse_index(H3270 *hSession, int ig1 unused, int ig2 unused)
1318 1308 return DATA;
1319 1309 }
1320 1310  
1321   -static enum lib3270_ansi_state ansi_send_attributes(H3270 *hSession, int nn, int ig2 unused)
  1311 +static enum lib3270_ansi_state ansi_send_attributes(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
1322 1312 {
1323 1313 if (!nn)
1324 1314 net_sends(hSession,"\033[?1;2c");
1325 1315 return DATA;
1326 1316 }
1327 1317  
1328   -static enum lib3270_ansi_state
1329   -dec_return_terminal_id(H3270 *hSession, int ig1 unused, int ig2 unused)
  1318 +static enum lib3270_ansi_state dec_return_terminal_id(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1330 1319 {
1331 1320 return ansi_send_attributes(hSession, 0, 0);
1332 1321 }
1333 1322  
1334   -static enum lib3270_ansi_state
1335   -ansi_set_mode(H3270 *hSession, int nn, int ig2 unused)
  1323 +static enum lib3270_ansi_state ansi_set_mode(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
1336 1324 {
1337 1325 switch (nn)
1338 1326 {
... ... @@ -1346,8 +1334,7 @@ ansi_set_mode(H3270 *hSession, int nn, int ig2 unused)
1346 1334 return DATA;
1347 1335 }
1348 1336  
1349   -static enum lib3270_ansi_state
1350   -ansi_reset_mode(H3270 *hSession, int nn, int ig2 unused)
  1337 +static enum lib3270_ansi_state ansi_reset_mode(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
1351 1338 {
1352 1339 switch (nn)
1353 1340 {
... ... @@ -1361,8 +1348,7 @@ ansi_reset_mode(H3270 *hSession, int nn, int ig2 unused)
1361 1348 return DATA;
1362 1349 }
1363 1350  
1364   -static enum lib3270_ansi_state
1365   -ansi_status_report(H3270 *hSession, int nn, int ig2 unused)
  1351 +static enum lib3270_ansi_state ansi_status_report(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
1366 1352 {
1367 1353 static char cpr[22];
1368 1354  
... ... @@ -1380,70 +1366,66 @@ ansi_status_report(H3270 *hSession, int nn, int ig2 unused)
1380 1366 return DATA;
1381 1367 }
1382 1368  
1383   -static enum lib3270_ansi_state
1384   -ansi_cs_designate(H3270 *hSession, int ig1 unused, int ig2 unused)
  1369 +static enum lib3270_ansi_state ansi_cs_designate(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1385 1370 {
1386 1371 hSession->cs_to_change = strchr(gnnames, hSession->ansi_ch) - gnnames;
1387 1372 return CSDES;
1388 1373 }
1389 1374  
1390   -static enum lib3270_ansi_state
1391   -ansi_cs_designate2(H3270 *hSession, int ig1 unused, int ig2 unused)
  1375 +static enum lib3270_ansi_state ansi_cs_designate2(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1392 1376 {
1393 1377 hSession->csd[hSession->cs_to_change] = strchr(csnames, hSession->ansi_ch) - csnames;
1394 1378 return DATA;
1395 1379 }
1396 1380  
1397   -static enum lib3270_ansi_state
1398   -ansi_select_g0(H3270 *hSession, int ig1 unused, int ig2 unused)
  1381 +static enum lib3270_ansi_state ansi_select_g0(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1399 1382 {
1400 1383 hSession->cset = CS_G0;
1401 1384 return DATA;
1402 1385 }
1403 1386  
1404   -static enum lib3270_ansi_state
1405   -ansi_select_g1(H3270 *hSession, int ig1 unused, int ig2 unused)
  1387 +static enum lib3270_ansi_state ansi_select_g1(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1406 1388 {
1407 1389 hSession->cset = CS_G1;
1408 1390 return DATA;
1409 1391 }
1410 1392  
1411 1393 static enum lib3270_ansi_state
1412   -ansi_select_g2(H3270 *hSession, int ig1 unused, int ig2 unused)
  1394 +ansi_select_g2(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1413 1395 {
1414 1396 hSession->cset = CS_G2;
1415 1397 return DATA;
1416 1398 }
1417 1399  
1418 1400 static enum lib3270_ansi_state
1419   -ansi_select_g3(H3270 *hSession, int ig1 unused, int ig2 unused)
  1401 +ansi_select_g3(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1420 1402 {
1421 1403 hSession->cset = CS_G3;
1422 1404 return DATA;
1423 1405 }
1424 1406  
1425 1407 static enum lib3270_ansi_state
1426   -ansi_one_g2(H3270 *hSession, int ig1 unused, int ig2 unused)
  1408 +ansi_one_g2(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1427 1409 {
1428 1410 hSession->once_cset = CS_G2;
1429 1411 return DATA;
1430 1412 }
1431 1413  
1432 1414 static enum lib3270_ansi_state
1433   -ansi_one_g3(H3270 *hSession, int ig1 unused, int ig2 unused)
  1415 +ansi_one_g3(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1434 1416 {
1435 1417 hSession->once_cset = CS_G3;
1436 1418 return DATA;
1437 1419 }
1438 1420  
1439 1421 static enum lib3270_ansi_state
1440   -ansi_esc3(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1422 +ansi_esc3(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1441 1423 {
1442 1424 return DECP;
1443 1425 }
1444 1426  
1445 1427 static enum lib3270_ansi_state
1446   -dec_set(H3270 *hSession, int ig1 unused, int ig2 unused)
  1428 +dec_set(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1447 1429 {
1448 1430 int i;
1449 1431  
... ... @@ -1480,7 +1462,7 @@ dec_set(H3270 *hSession, int ig1 unused, int ig2 unused)
1480 1462 }
1481 1463  
1482 1464 static enum lib3270_ansi_state
1483   -dec_reset(H3270 *hSession, int ig1 unused, int ig2 unused)
  1465 +dec_reset(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1484 1466 {
1485 1467 int i;
1486 1468  
... ... @@ -1513,7 +1495,7 @@ dec_reset(H3270 *hSession, int ig1 unused, int ig2 unused)
1513 1495 return DATA;
1514 1496 }
1515 1497  
1516   -static enum lib3270_ansi_state dec_save(H3270 *hSession, int ig1 unused, int ig2 unused)
  1498 +static enum lib3270_ansi_state dec_save(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1517 1499 {
1518 1500 int i;
1519 1501  
... ... @@ -1543,7 +1525,7 @@ static enum lib3270_ansi_state dec_save(H3270 *hSession, int ig1 unused, int ig2
1543 1525 }
1544 1526  
1545 1527 static enum lib3270_ansi_state
1546   -dec_restore(H3270 *hSession, int ig1 unused, int ig2 unused)
  1528 +dec_restore(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1547 1529 {
1548 1530 int i;
1549 1531  
... ... @@ -1599,7 +1581,7 @@ dec_scrolling_region(H3270 *hSession, int top, int bottom)
1599 1581 }
1600 1582  
1601 1583 static enum lib3270_ansi_state
1602   -xterm_text_mode(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1584 +xterm_text_mode(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1603 1585 {
1604 1586 nx = 0;
1605 1587 n[0] = 0;
... ... @@ -1607,14 +1589,14 @@ xterm_text_mode(H3270 *hSession unused, int ig1 unused, int ig2 unused)
1607 1589 }
1608 1590  
1609 1591 static enum lib3270_ansi_state
1610   -xterm_text_semicolon(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1592 +xterm_text_semicolon(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1611 1593 {
1612 1594 tx = 0;
1613 1595 return LIB3270_ANSI_STATE_TEXT2;
1614 1596 }
1615 1597  
1616 1598 static enum lib3270_ansi_state
1617   -xterm_text(H3270 *hSession, int ig1 unused, int ig2 unused)
  1599 +xterm_text(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1618 1600 {
1619 1601 if (tx < NT)
1620 1602 text[tx++] = hSession->ansi_ch;
... ... @@ -1622,7 +1604,7 @@ xterm_text(H3270 *hSession, int ig1 unused, int ig2 unused)
1622 1604 }
1623 1605  
1624 1606 static enum lib3270_ansi_state
1625   -xterm_text_do(H3270 *hSession unused, int ig1 unused, int ig2 unused)
  1607 +xterm_text_do(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1626 1608 {
1627 1609 /*
1628 1610 #if defined(X3270_DISPLAY) || defined(WC3270)
... ... @@ -1666,7 +1648,7 @@ xterm_text_do(H3270 *hSession unused, int ig1 unused, int ig2 unused)
1666 1648 }
1667 1649  
1668 1650 static enum lib3270_ansi_state
1669   -ansi_htab_set(H3270 *hSession, int ig1 unused, int ig2 unused)
  1651 +ansi_htab_set(H3270 *hSession, int GNUC_UNUSED(ig1), int GNUC_UNUSED(ig2))
1670 1652 {
1671 1653 register int col = hSession->cursor_addr % hSession->cols;
1672 1654  
... ... @@ -1675,7 +1657,7 @@ ansi_htab_set(H3270 *hSession, int ig1 unused, int ig2 unused)
1675 1657 }
1676 1658  
1677 1659 static enum lib3270_ansi_state
1678   -ansi_htab_clear(H3270 *hSession, int nn, int ig2 unused)
  1660 +ansi_htab_clear(H3270 *hSession, int nn, int GNUC_UNUSED(ig2))
1679 1661 {
1680 1662 register int col, i;
1681 1663  
... ... @@ -1721,7 +1703,7 @@ static void ansi_scroll(H3270 *hSession)
1721 1703 }
1722 1704  
1723 1705 /* Callback for when we enter ANSI mode. */
1724   -void ansi_in3270(H3270 *session, int in3270, void *dunno unused)
  1706 +void ansi_in3270(H3270 *session, int in3270, void GNUC_UNUSED(*dunno))
1725 1707 {
1726 1708 if (!in3270)
1727 1709 (void) ansi_reset(session, 0, 0);
... ... @@ -1847,8 +1829,7 @@ ansi_send_pf(H3270 *hSession, int nn)
1847 1829 net_sends(hSession,fn_buf);
1848 1830 }
1849 1831  
1850   -void
1851   -ansi_send_pa(H3270 *hSession, int nn)
  1832 +void ansi_send_pa(H3270 *hSession, int nn)
1852 1833 {
1853 1834 static char fn_buf[4];
1854 1835 static char code[4] = { 'P', 'Q', 'R', 'S' };
... ... @@ -1859,7 +1840,7 @@ ansi_send_pa(H3270 *hSession, int nn)
1859 1840 net_sends(hSession,fn_buf);
1860 1841 }
1861 1842  
1862   -void toggle_lineWrap(H3270 *hSession, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE type unused)
  1843 +void toggle_lineWrap(H3270 *hSession, struct lib3270_toggle GNUC_UNUSED(*t), LIB3270_TOGGLE_TYPE GNUC_UNUSED(type))
1863 1844 {
1864 1845 if (lib3270_get_toggle(hSession,LIB3270_TOGGLE_LINE_WRAP))
1865 1846 hSession->wraparound_mode = 1;
... ...
src/lib3270/ctlr.c
... ... @@ -117,7 +117,7 @@ static const unsigned char code_table[64] =
117 117 /*
118 118 * Initialize the emulated 3270 hardware.
119 119 */
120   -void ctlr_init(H3270 *session, unsigned cmask unused)
  120 +void ctlr_init(H3270 *session, unsigned GNUC_UNUSED(cmask))
121 121 {
122 122 /* Register callback routines. */
123 123 lib3270_register_schange(session,LIB3270_STATE_HALF_CONNECT, ctlr_half_connect, 0);
... ... @@ -390,18 +390,18 @@ static void update_formatted(H3270 *hSession)
390 390  
391 391 }
392 392  
393   -/*
394   - * Called when a host is half connected.
395   - */
396   -static void ctlr_half_connect(H3270 *hSession, int ignored unused, void *dunno unused)
  393 +///
  394 +/// @brief Called when a host is half connected.
  395 +///
  396 +static void ctlr_half_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
397 397 {
398 398 ticking_start(hSession,True);
399 399 }
400 400  
401   -/*
402   - * Called when a host connects, disconnects, or changes ANSI/3270 modes.
403   - */
404   -static void ctlr_connect(H3270 *hSession, int ignored unused, void *dunno unused)
  401 +///
  402 +/// @brief Called when a host connects, disconnects, or changes ANSI/3270 modes.
  403 +///
  404 +static void ctlr_connect(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
405 405 {
406 406 ticking_stop(hSession);
407 407 status_untiming(hSession);
... ... @@ -2645,7 +2645,7 @@ void ctlr_wrapping_memmove(H3270 *hSession, int baddr_to, int baddr_from, int co
2645 2645 *
2646 2646 * @param hSession Session handle
2647 2647 */
2648   -void ctlr_bcopy(H3270 *hSession, int baddr_from, int baddr_to, int count, int move_ea unused)
  2648 +void ctlr_bcopy(H3270 *hSession, int baddr_from, int baddr_to, int count, int GNUC_UNUSED(move_ea))
2649 2649 {
2650 2650 /* Move the characters. */
2651 2651 if (memcmp((char *) &hSession->ea_buf[baddr_from],(char *) &hSession->ea_buf[baddr_to],count * sizeof(struct lib3270_ea)))
... ... @@ -2663,7 +2663,7 @@ void ctlr_bcopy(H3270 *hSession, int baddr_from, int baddr_to, int count, int mo
2663 2663 * @param hSession Session handle
2664 2664 *
2665 2665 */
2666   -void ctlr_aclear(H3270 *hSession, int baddr, int count, int clear_ea unused)
  2666 +void ctlr_aclear(H3270 *hSession, int baddr, int count, int GNUC_UNUSED(clear_ea))
2667 2667 {
2668 2668 if (memcmp((char *) &hSession->ea_buf[baddr], (char *) hSession->zero_buf,
2669 2669 count * sizeof(struct lib3270_ea))) {
... ... @@ -2674,8 +2674,8 @@ void ctlr_aclear(H3270 *hSession, int baddr, int count, int clear_ea unused)
2674 2674 /* XXX: What about clear_ea? */
2675 2675 }
2676 2676  
2677   -/*
2678   - * Scroll the screen 1 row.
  2677 +/**
  2678 + * @brief Scroll the screen 1 row.
2679 2679 *
2680 2680 * This could be accomplished with ctlr_bcopy() and ctlr_aclear(), but this
2681 2681 * operation is common enough to warrant a separate path.
... ... @@ -2700,8 +2700,8 @@ void ctlr_scroll(H3270 *hSession)
2700 2700 }
2701 2701 #endif /*]*/
2702 2702  
2703   -/*
2704   - * Swap the regular and alternate screen buffers
  2703 +/**
  2704 + * @brief Swap the regular and alternate screen buffers
2705 2705 */
2706 2706 void ctlr_altbuffer(H3270 *session, int alt)
2707 2707 {
... ... @@ -2728,9 +2728,8 @@ void ctlr_altbuffer(H3270 *session, int alt)
2728 2728 }
2729 2729 }
2730 2730  
2731   -
2732   -/*
2733   - * Set or clear the MDT on an attribute
  2731 +/**
  2732 + * @brief Set or clear the MDT on an attribute
2734 2733 */
2735 2734 void mdt_set(H3270 *hSession, int baddr)
2736 2735 {
... ... @@ -2778,7 +2777,6 @@ ctlr_dbcs_state(int baddr)
2778 2777 }
2779 2778 #endif /*]*/
2780 2779  
2781   -
2782 2780 /*
2783 2781 * Transaction timing. The time between sending an interrupt (PF, PA, Enter,
2784 2782 * Clear) and the host unlocking the keyboard is indicated on the status line
... ... @@ -2791,9 +2789,8 @@ ctlr_dbcs_state(int baddr)
2791 2789 //static void * tick_id;
2792 2790 //static struct timeval t_want;
2793 2791  
2794   -/* Return the difference in milliseconds between two timevals. */
2795   -static long
2796   -delta_msec(struct timeval *t1, struct timeval *t0)
  2792 +/// @brief Return the difference in milliseconds between two timevals.
  2793 +static long delta_msec(struct timeval *t1, struct timeval *t0)
2797 2794 {
2798 2795 return (t1->tv_sec - t0->tv_sec) * 1000 +
2799 2796 (t1->tv_usec - t0->tv_usec + 500) / 1000;
... ...
src/lib3270/ft.c
... ... @@ -164,37 +164,37 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state);
164 164 return 0;
165 165 }
166 166  
167   - static void def_complete(H3270 *hSession, unsigned long length unused, double kbytes_sec unused, const char *msg, void *userdata unused)
  167 + static void def_complete(H3270 *hSession, unsigned long GNUC_UNUSED(length), double GNUC_UNUSED(kbytes_sec), const char *msg, void GNUC_UNUSED(*userdata))
168 168 {
169 169 hSession->ft->cbk.message(hSession,msg,hSession->ft->user_data);
170 170 }
171 171  
172   - static void def_failed(H3270 *hSession, unsigned long length,double kbytes_sec,const char *msg, void *userdata)
  172 + static void def_failed(H3270 *hSession, unsigned long length, double kbytes_sec, const char *msg, void *userdata)
173 173 {
174 174 hSession->ft->cbk.complete(hSession,length,kbytes_sec,msg,userdata);
175 175 }
176 176  
177   - static void def_message(H3270 *hSession, const char *msg, void *userdata unused)
  177 + static void def_message(H3270 *hSession, const char *msg, void GNUC_UNUSED(*userdata))
178 178 {
179 179 lib3270_write_log(hSession,"ft","%s",msg);
180 180 }
181 181  
182   - static void def_update(H3270 *hSession unused, unsigned long current unused, unsigned long length unused, double kbytes_sec unused, void *userdata unused)
  182 + static void def_update(H3270 GNUC_UNUSED(*hSession), unsigned long GNUC_UNUSED(current), unsigned long GNUC_UNUSED(length), double GNUC_UNUSED(kbytes_sec), void GNUC_UNUSED(*userdata))
183 183 {
184 184  
185 185 }
186 186  
187   - static void def_running(H3270 *hSession unused, int is_cut unused, void *userdata unused)
  187 + static void def_running(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(is_cut), void GNUC_UNUSED(*userdata))
188 188 {
189 189  
190 190 }
191 191  
192   - static void def_aborting(H3270 *hSession unused, const char *reason unused, void *userdata unused)
  192 + static void def_aborting(H3270 GNUC_UNUSED(*hSession), const char GNUC_UNUSED(*reason), void GNUC_UNUSED(*userdata))
193 193 {
194 194  
195 195 }
196 196  
197   - static void def_state_changed(H3270 *hSession unused, LIB3270_FT_STATE state unused, const char *text unused, void *userdata unused)
  197 + static void def_state_changed(H3270 GNUC_UNUSED(*hSession), LIB3270_FT_STATE GNUC_UNUSED(state), const char GNUC_UNUSED(*text), void GNUC_UNUSED(*userdata))
198 198 {
199 199  
200 200 }
... ... @@ -679,14 +679,14 @@ void ft_aborting(H3270FT *h, const char *reason)
679 679 }
680 680  
681 681 /* Process a disconnect abort. */
682   -static void ft_connected(H3270 *hSession, int ignored unused, void *dunno unused)
  682 +static void ft_connected(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
683 683 {
684 684 if (!CONNECTED && lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE)
685 685 ft_failed(get_ft_handle(hSession),_("Host disconnected, transfer cancelled"));
686 686 }
687 687  
688 688 /* Process an abort from no longer being in 3270 mode. */
689   -static void ft_in3270(H3270 *hSession, int ignored unused, void *dunno unused)
  689 +static void ft_in3270(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
690 690 {
691 691 if (!IN_3270 && lib3270_get_ft_state(hSession) != LIB3270_FT_STATE_NONE)
692 692 ft_failed(get_ft_handle(hSession),_("Not in 3270 mode, transfer cancelled"));
... ...
src/lib3270/ft_dft.c
... ... @@ -91,10 +91,10 @@ static void dft_set_cur_req(H3270 *hSession);
91 91 static int filter_len(char *s, register int len);
92 92  
93 93 /**
94   - * Process a Transfer Data structured field from the host.
  94 + * @brief Process a Transfer Data structured field from the host.
95 95 *
96 96 */
97   -void ft_dft_data(H3270 *hSession, unsigned char *data, int length unused)
  97 +void ft_dft_data(H3270 *hSession, unsigned char *data, int GNUC_UNUSED(length))
98 98 {
99 99 struct data_buffer *data_bufr = (struct data_buffer *)data;
100 100 unsigned short data_length, data_type;
... ...
src/lib3270/host.c
... ... @@ -327,7 +327,7 @@ LIB3270_EXPORT const char * lib3270_get_url(H3270 *hSession)
327 327  
328 328 }
329 329  
330   -LIB3270_EXPORT const char * lib3270_get_default_host(H3270 *hSession unused)
  330 +LIB3270_EXPORT const char * lib3270_get_default_host(H3270 GNUC_UNUSED(*hSession))
331 331 {
332 332 #ifdef LIB3270_DEFAULT_HOST
333 333 return LIB3270_DEFAULT_HOST;
... ...
src/lib3270/iocalls.c
... ... @@ -349,7 +349,7 @@ static int internal_wait(H3270 *hSession, int seconds)
349 349 return 0;
350 350 }
351 351  
352   -static void internal_ring_bell(H3270 *session unused)
  352 +static void internal_ring_bell(H3270 GNUC_UNUSED(*session))
353 353 {
354 354 return;
355 355 }
... ...
src/lib3270/kybd.c
... ... @@ -395,7 +395,7 @@ void kybd_inhibit(H3270 *session, Boolean inhibit)
395 395 /**
396 396 * @brief Called when a host connects or disconnects.
397 397 */
398   -void kybd_connect(H3270 *session, int connected, void *dunno unused)
  398 +void kybd_connect(H3270 *session, int connected, void GNUC_UNUSED(*dunno))
399 399 {
400 400 if (session->kybdlock & KL_DEFERRED_UNLOCK)
401 401 RemoveTimer(session, session->unlock_id);
... ... @@ -417,7 +417,7 @@ void kybd_connect(H3270 *session, int connected, void *dunno unused)
417 417 /**
418 418 * @brief Called when we switch between 3270 and ANSI modes.
419 419 */
420   -void kybd_in3270(H3270 *hSession, int in3270 unused, void *dunno unused)
  420 +void kybd_in3270(H3270 *hSession, int GNUC_UNUSED(in3270), void GNUC_UNUSED(*dunno))
421 421 {
422 422 if (hSession->kybdlock & KL_DEFERRED_UNLOCK)
423 423 RemoveTimer(hSession, hSession->unlock_id);
... ... @@ -690,7 +690,7 @@ static Boolean ins_prep(H3270 *hSession, int faddr, int baddr, int count)
690 690 #define GE_WFLAG 0x100
691 691 #define PASTE_WFLAG 0x200
692 692  
693   -static void key_Character_wrapper(H3270 *hSession, const char *param1, const char *param2 unused)
  693 +static void key_Character_wrapper(H3270 *hSession, const char *param1, const char GNUC_UNUSED(*param2))
694 694 {
695 695 int code;
696 696 Boolean with_ge = False;
... ...
src/lib3270/log.c
... ... @@ -81,7 +81,7 @@
81 81 loghandler(session,module,0,fmt,arg);
82 82 }
83 83  
84   - static void defaultlog(H3270 *session unused, const char *module, int rc unused, const char *fmt, va_list arg_ptr)
  84 + static void defaultlog(H3270 GNUC_UNUSED(*session), const char *module, int GNUC_UNUSED(rc), const char *fmt, va_list arg_ptr)
85 85 {
86 86 fprintf(stderr,"%s:\t",module);
87 87 vfprintf(stderr,fmt,arg_ptr);
... ...
src/lib3270/private.h
... ... @@ -93,7 +93,7 @@
93 93 //
94 94 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
95 95  
96   - #define unused __attribute__((__unused__))
  96 +// #define unused __attribute__((__unused__))
97 97  
98 98 #define GNUC_UNUSED \
99 99 __attribute__((__unused__))
... ...
src/lib3270/properties.c
... ... @@ -285,12 +285,12 @@
285 285 return properties;
286 286 }
287 287  
288   - static const char * get_version(H3270 *hSession unused)
  288 + static const char * get_version(H3270 GNUC_UNUSED(*hSession))
289 289 {
290 290 return lib3270_get_version();
291 291 }
292 292  
293   - static const char * get_revision(H3270 *hSession unused)
  293 + static const char * get_revision(H3270 GNUC_UNUSED(*hSession))
294 294 {
295 295 return lib3270_get_revision();
296 296 }
... ...
src/lib3270/screen.c
... ... @@ -722,7 +722,7 @@ void status_lu(H3270 *session, const char *lu)
722 722  
723 723 }
724 724  
725   -static void status_connect(H3270 *hSession, int connected, void *dunno unused)
  725 +static void status_connect(H3270 *hSession, int connected, void GNUC_UNUSED(*dunno))
726 726 {
727 727 LIB3270_MESSAGE id = LIB3270_MESSAGE_USER;
728 728  
... ... @@ -748,7 +748,7 @@ static void status_connect(H3270 *hSession, int connected, void *dunno unused)
748 748  
749 749 }
750 750  
751   -static void status_3270_mode(H3270 *hSession, int ignored unused, void *dunno unused)
  751 +static void status_3270_mode(H3270 *hSession, int GNUC_UNUSED(ignored), void GNUC_UNUSED(*dunno))
752 752 {
753 753 Boolean oia_boxsolid = (IN_3270 && !IN_SSCP);
754 754  
... ... @@ -767,7 +767,7 @@ static void status_printer(H3270 *session, int on, void *dunno)
767 767 }
768 768 */
769 769  
770   -void status_timing(H3270 *session unused, struct timeval *t0 unused, struct timeval *t1 unused)
  770 +void status_timing(H3270 GNUC_UNUSED(*session), struct timeval GNUC_UNUSED(*t0), struct timeval GNUC_UNUSED(*t1))
771 771 {
772 772 }
773 773  
... ...
src/lib3270/selection.c
... ... @@ -165,7 +165,7 @@ static void update_selected_region(H3270 *session)
165 165  
166 166 }
167 167  
168   -void toggle_rectselect(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused)
  168 +void toggle_rectselect(H3270 *session, struct lib3270_toggle GNUC_UNUSED(*t), LIB3270_TOGGLE_TYPE GNUC_UNUSED(tt))
169 169 {
170 170 if(!session->selected)
171 171 return;
... ...
src/lib3270/session.c
... ... @@ -155,49 +155,49 @@ void lib3270_session_free(H3270 *h)
155 155  
156 156 }
157 157  
158   -static void update_char(H3270 *session unused, int addr unused, unsigned char chr unused, unsigned short attr unused, unsigned char cursor unused)
  158 +static void update_char(H3270 GNUC_UNUSED(*session), int GNUC_UNUSED(addr), unsigned char GNUC_UNUSED(chr), unsigned short GNUC_UNUSED(attr), unsigned char GNUC_UNUSED(cursor))
159 159 {
160 160 }
161 161  
162   -static void nop_char(H3270 *session unused, unsigned char chr unused)
  162 +static void nop_char(H3270 GNUC_UNUSED(*session), unsigned char GNUC_UNUSED(chr))
163 163 {
164 164 }
165 165  
166   -static void nop(H3270 *session unused)
  166 +static void nop(H3270 GNUC_UNUSED(*session))
167 167 {
168 168 }
169 169  
170   -static void update_model(H3270 *session unused, const char *name unused, int model unused, int rows unused, int cols unused)
  170 +static void update_model(H3270 GNUC_UNUSED(*session), const char GNUC_UNUSED(*name), int GNUC_UNUSED(model), int GNUC_UNUSED(rows), int GNUC_UNUSED(cols))
171 171 {
172 172 }
173 173  
174   -static void changed(H3270 *session unused, int bstart unused, int bend unused)
  174 +static void changed(H3270 GNUC_UNUSED(*session), int GNUC_UNUSED(bstart), int GNUC_UNUSED(bend))
175 175 {
176 176 }
177 177  
178   -static void update_cursor(H3270 *session unused, unsigned short row unused, unsigned short col unused, unsigned char c unused, unsigned short attr unused)
  178 +static void update_cursor(H3270 GNUC_UNUSED(*session), unsigned short GNUC_UNUSED(row), unsigned short GNUC_UNUSED(col), unsigned char GNUC_UNUSED(c), unsigned short GNUC_UNUSED(attr))
179 179 {
180 180 }
181 181  
182   -static void update_oia(H3270 *session unused, LIB3270_FLAG id unused, unsigned char on unused)
  182 +static void update_oia(H3270 GNUC_UNUSED(*session), LIB3270_FLAG GNUC_UNUSED(id), unsigned char GNUC_UNUSED(on))
183 183 {
184 184 }
185 185  
186   -static void update_selection(H3270 *session unused, int start unused, int end unused)
  186 +static void update_selection(H3270 GNUC_UNUSED(*session), int GNUC_UNUSED(start), int GNUC_UNUSED(end))
187 187 {
188 188 }
189 189  
190   -static void set_cursor(H3270 *session unused, LIB3270_POINTER id unused)
  190 +static void set_cursor(H3270 GNUC_UNUSED(*session), LIB3270_POINTER GNUC_UNUSED(id))
191 191 {
192 192 }
193 193  
194   -static int print(H3270 *session, LIB3270_PRINT_MODE mode unused)
  194 +static int print(H3270 *session, LIB3270_PRINT_MODE GNUC_UNUSED(mode))
195 195 {
196 196 lib3270_write_log(session, "print", "%s", "Printing is unavailable");
197 197 return errno = ENOTSUP;
198 198 }
199 199  
200   -static void message(H3270 *session, LIB3270_NOTIFY id unused, const char *title, const char *msg, const char *text)
  200 +static void message(H3270 *session, LIB3270_NOTIFY GNUC_UNUSED(id), const char *title, const char *msg, const char *text)
201 201 {
202 202 #ifdef ANDROID
203 203 __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, "%s\n",title);
... ... @@ -210,7 +210,7 @@ static void message(H3270 *session, LIB3270_NOTIFY id unused, const char *title
210 210 #endif // ANDROID
211 211 }
212 212  
213   -static void def_popup(H3270 *session, LIB3270_NOTIFY type unused, const char *title, const char *msg, const char *fmt, va_list arg)
  213 +static void def_popup(H3270 *session, LIB3270_NOTIFY GNUC_UNUSED(type), const char *title, const char *msg, const char *fmt, va_list arg)
214 214 {
215 215 #ifdef ANDROID
216 216 char *mask = xs_buffer("%s\n",fmt);
... ... @@ -223,17 +223,17 @@ static void def_popup(H3270 *session, LIB3270_NOTIFY type unused, const char *ti
223 223 #endif // ANDROID
224 224 }
225 225  
226   -static void def_trace(H3270 *session unused, void *userdata unused, const char *fmt, va_list args)
  226 +static void def_trace(H3270 GNUC_UNUSED(*session), void GNUC_UNUSED(*userdata), const char *fmt, va_list args)
227 227 {
228 228 vfprintf(stdout,fmt,args);
229 229 fflush(stdout);
230 230 }
231 231  
232   -static void update_ssl(H3270 *session unused, LIB3270_SSL_STATE state unused)
  232 +static void update_ssl(H3270 GNUC_UNUSED(*session), LIB3270_SSL_STATE GNUC_UNUSED(state))
233 233 {
234 234 }
235 235  
236   -static void set_timer(H3270 *session unused, unsigned char on unused)
  236 +static void set_timer(H3270 GNUC_UNUSED(*session), unsigned char GNUC_UNUSED(on))
237 237 {
238 238 }
239 239  
... ... @@ -243,24 +243,24 @@ static void screen_disp(H3270 *session)
243 243 screen_update(session,0,session->rows*session->cols);
244 244 }
245 245  
246   -static void nop_int(H3270 *session unused, int width unused)
  246 +static void nop_int(H3270 GNUC_UNUSED(*session), int GNUC_UNUSED(width))
247 247 {
248 248 return;
249 249 }
250 250  
251 251 #ifdef HAVE_LIBSSL
252   -static void set_peer_certificate(const X509 *cert unused)
  252 +static void set_peer_certificate(const X509 GNUC_UNUSED(*cert))
253 253 {
254 254  
255 255 }
256 256 #else
257   -static void set_peer_certificate)(const void *cert unused)
  257 +static void set_peer_certificate)(const void GNUC_UNUSED(*cert))
258 258 {
259 259  
260 260 }
261 261 #endif // HAVE_LIBSSL
262 262  
263   -static void default_update_luname(H3270 *session unused, const char *name unused)
  263 +static void default_update_luname(H3270 GNUC_UNUSED(*session), const char GNUC_UNUSED(*name))
264 264 {
265 265  
266 266 }
... ...
src/lib3270/ssl/linux/getcrl.c
... ... @@ -164,7 +164,7 @@ static size_t internal_curl_write_callback(void *contents, size_t size, size_t n
164 164 return realsize;
165 165 }
166 166  
167   -static int internal_curl_trace_callback(CURL *handle unused, curl_infotype type, char *data, size_t size, void *userp)
  167 +static int internal_curl_trace_callback(CURL GNUC_UNUSED(*handle), curl_infotype type, char *data, size_t size, void *userp)
168 168 {
169 169 const char * text = NULL;
170 170  
... ...
src/lib3270/telnet.c
... ... @@ -617,7 +617,7 @@ LIB3270_EXPORT void lib3270_data_recv(H3270 *hSession, size_t nr, const unsigned
617 617 * @param hSession Session handle
618 618 *
619 619 */
620   -void net_input(H3270 *hSession, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused)
  620 +void net_input(H3270 *hSession, int GNUC_UNUSED(fd), LIB3270_IO_FLAG GNUC_UNUSED(flag), void GNUC_UNUSED(*dunno))
621 621 {
622 622 // register unsigned char * cp;
623 623 int nr;
... ... @@ -1579,11 +1579,10 @@ static int process_eor(H3270 *hSession)
1579 1579 }
1580 1580  
1581 1581  
1582   -/*
1583   - * net_exception
1584   - * Called when there is an exceptional condition on the socket.
  1582 +/**
  1583 + * @brief Called when there is an exceptional condition on the socket.
1585 1584 */
1586   -void net_exception(H3270 *session, int fd unused, LIB3270_IO_FLAG flag unused, void *dunno unused)
  1585 +void net_exception(H3270 *session, int GNUC_UNUSED(fd), LIB3270_IO_FLAG GNUC_UNUSED(flag), void GNUC_UNUSED(*dunno))
1587 1586 {
1588 1587 CHECK_SESSION_HANDLE(session);
1589 1588  
... ... @@ -1600,13 +1599,14 @@ void net_exception(H3270 *session, int fd unused, LIB3270_IO_FLAG flag unused, v
1600 1599 }
1601 1600 }
1602 1601  
1603   -/*
  1602 +/**
  1603 + * @brief send a 3270 record
  1604 + *
1604 1605 * Flavors of Network Output:
1605 1606 *
1606   - * 3270 mode
1607   - * net_output send a 3270 record
  1607 + * 3270 mode
1608 1608 *
1609   - * ANSI mode; call each other in turn
  1609 + * ANSI mode; call each other in turn
1610 1610 * net_sendc net_cookout for 1 byte
1611 1611 * net_sends net_cookout for a null-terminated string
1612 1612 * net_cookout send user data with cooked-mode processing, ANSI mode
... ...
src/lib3270/toggles.c
... ... @@ -303,13 +303,13 @@ LIB3270_EXPORT int lib3270_toggle(H3270 *session, LIB3270_TOGGLE ix)
303 303 return (int) t->value;
304 304 }
305 305  
306   -static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE tt unused)
  306 +static void toggle_altscreen(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGGLE_TYPE GNUC_UNUSED(tt))
307 307 {
308 308 if(!session->screen_alt)
309 309 set_viewsize(session,t->value ? 24 : session->maxROWS,80);
310 310 }
311 311  
312   -static void toggle_redraw(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused)
  312 +static void toggle_redraw(H3270 *session, struct lib3270_toggle GNUC_UNUSED(*t), LIB3270_TOGGLE_TYPE GNUC_UNUSED(tt))
313 313 {
314 314 session->cbk.display(session);
315 315 }
... ... @@ -317,11 +317,11 @@ static void toggle_redraw(H3270 *session, struct lib3270_toggle *t unused, LIB32
317 317 /*
318 318 * No-op toggle.
319 319 */
320   -static void toggle_nop(H3270 *session unused, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused )
  320 +static void toggle_nop(H3270 GNUC_UNUSED(*session), struct lib3270_toggle GNUC_UNUSED(*t), LIB3270_TOGGLE_TYPE GNUC_UNUSED(tt))
321 321 {
322 322 }
323 323  
324   -static void toggle_keepalive(H3270 *session, struct lib3270_toggle *t unused, LIB3270_TOGGLE_TYPE tt unused )
  324 +static void toggle_keepalive(H3270 *session, struct lib3270_toggle GNUC_UNUSED(*t), LIB3270_TOGGLE_TYPE GNUC_UNUSED(tt))
325 325 {
326 326 if(session->sock > 0)
327 327 {
... ...
src/lib3270/utf8.c
... ... @@ -351,7 +351,7 @@ static char *utf8_tab[U_MAX][96] = {
351 351 * character set.
352 352 * Returns 0 if the lookup fails.
353 353 */
354   -unsigned char utf8_lookup(char *mbs unused, enum ulfail *fail, int *consumed unused)
  354 +unsigned char utf8_lookup(char GNUC_UNUSED(*mbs), enum ulfail *fail, int GNUC_UNUSED(*consumed))
355 355 {
356 356 if (fail != NULL)
357 357 *fail = ULFAIL_NOUTF8;
... ...