diff options
author | Adam Jackson <ajax@redhat.com> | 2018-04-05 12:21:53 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-04-05 14:18:16 -0400 |
commit | 4c1453393feaebd688571ed1ba16c21703119ced (patch) | |
tree | 37ba6dda58485233bffc00afb276fe06a197e54e | |
parent | 99f9b077c62e14ba955b9c1f7afda47f7799d317 (diff) |
gtf: Warning fix
../hw/xfree86/utils/gtf/gtf.c: In function ‘print_fb_mode’:
../hw/xfree86/utils/gtf/gtf.c:241:50: warning: cast from function call of type ‘double’ to non-matching type ‘int’ [-Wbad-function-cast]
printf(" timings %d %d %d %d %d %d %d\n", (int) rint(1000000.0 / m->pclk), /* pixclock in picoseconds */
That's pretty nitpicky of you, gcc, but at least it's easy to fix.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/utils/gtf/gtf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/utils/gtf/gtf.c b/hw/xfree86/utils/gtf/gtf.c index c31bc8f93..818ee0fd7 100644 --- a/hw/xfree86/utils/gtf/gtf.c +++ b/hw/xfree86/utils/gtf/gtf.c @@ -238,7 +238,7 @@ print_fb_mode(mode * m) printf(" # PCLK: %.2f MHz, H: %.2f kHz, V: %.2f Hz\n", m->pclk, m->h_freq, m->v_freq); printf(" geometry %d %d %d %d 32\n", m->hr, m->vr, m->hr, m->vr); - printf(" timings %d %d %d %d %d %d %d\n", (int) rint(1000000.0 / m->pclk), /* pixclock in picoseconds */ + printf(" timings %d %d %d %d %d %d %d\n", (int)lrint(1000000.0 / m->pclk), /* pixclock in picoseconds */ m->hfl - m->hse, /* left margin (in pixels) */ m->hss - m->hr, /* right margin (in pixels) */ m->vfl - m->vse, /* upper margin (in pixel lines) */ |