gcc warning cleanups.

This commit is contained in:
Hisham Muhammad 2015-10-05 11:27:44 -03:00
parent bf276a0993
commit fbb4c49edd
2 changed files with 5 additions and 5 deletions

2
CRT.c
View File

@ -552,7 +552,7 @@ void CRT_init(int delay, int colorScheme) {
CRT_colorScheme = colorScheme;
for (int i = 0; i < LAST_COLORELEMENT; i++) {
int color = CRT_colorSchemes[COLORSCHEME_DEFAULT][i];
unsigned int color = CRT_colorSchemes[COLORSCHEME_DEFAULT][i];
CRT_colorSchemes[COLORSCHEME_BROKENGRAY][i] = color == (A_BOLD | ColorPair(Black,Black)) ? ColorPair(White,Black) : color;
}

8
htop.c
View File

@ -108,7 +108,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
}
flags.sortKey = ColumnsPanel_fieldNameToIndex(optarg);
if (flags.sortKey == -1) {
errx(1, stderr, "Error: invalid column \"%s\".\n", optarg);
fprintf(stderr, "Error: invalid column \"%s\".\n", optarg);
}
break;
case 'd':
@ -116,12 +116,12 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
if (flags.delay < 1) flags.delay = 1;
if (flags.delay > 100) flags.delay = 100;
} else {
errx(1, stderr, "Error: invalid delay value \"%s\".\n", optarg);
fprintf(stderr, "Error: invalid delay value \"%s\".\n", optarg);
}
break;
case 'u':
if (!Action_setUserOnly(optarg, &(flags.userId))) {
errx(1, stderr, "Error: invalid user \"%s\".\n", optarg);
fprintf(stderr, "Error: invalid user \"%s\".\n", optarg);
}
break;
case 'C':
@ -176,7 +176,7 @@ int main(int argc, char** argv) {
#ifdef HAVE_PROC
if (access(PROCDIR, R_OK) != 0) {
errx(1, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
fprintf("Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
}
#endif