mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
gcc warning cleanups.
This commit is contained in:
parent
bf276a0993
commit
fbb4c49edd
2
CRT.c
2
CRT.c
@ -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
8
htop.c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user