mirror of https://github.com/xzeldon/htop.git
Merge pull request #387 from gaod/master
Suppress compiler warnings on FreeBSD
This commit is contained in:
commit
a618f477b2
|
@ -115,7 +115,7 @@ void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField fiel
|
||||||
char buffer[256]; buffer[255] = '\0';
|
char buffer[256]; buffer[255] = '\0';
|
||||||
int attr = CRT_colors[DEFAULT_COLOR];
|
int attr = CRT_colors[DEFAULT_COLOR];
|
||||||
int n = sizeof(buffer) - 1;
|
int n = sizeof(buffer) - 1;
|
||||||
switch (field) {
|
switch ((int) field) {
|
||||||
// add FreeBSD-specific fields here
|
// add FreeBSD-specific fields here
|
||||||
case JID: snprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
case JID: snprintf(buffer, n, Process_pidFormat, fp->jid); break;
|
||||||
case JAIL:{
|
case JAIL:{
|
||||||
|
@ -143,7 +143,7 @@ long FreeBSDProcess_compare(const void* v1, const void* v2) {
|
||||||
p2 = (FreeBSDProcess*)v1;
|
p2 = (FreeBSDProcess*)v1;
|
||||||
p1 = (FreeBSDProcess*)v2;
|
p1 = (FreeBSDProcess*)v2;
|
||||||
}
|
}
|
||||||
switch (settings->sortKey) {
|
switch ((int) settings->sortKey) {
|
||||||
// add FreeBSD-specific fields here
|
// add FreeBSD-specific fields here
|
||||||
case JID:
|
case JID:
|
||||||
return (p1->jid - p2->jid);
|
return (p1->jid - p2->jid);
|
||||||
|
|
|
@ -24,6 +24,7 @@ in the source distribution for its full text.
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <vm/vm_param.h>
|
#include <vm/vm_param.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/*{
|
/*{
|
||||||
#include "Action.h"
|
#include "Action.h"
|
||||||
|
|
Loading…
Reference in New Issue