[igt-dev] [PATCH i-g-t 7/7] tools/intel_panel_fitter: Fix abs(unsigned)
Ville Syrjala
ville.syrjala at linux.intel.com
Tue Jan 14 14:25:23 UTC 2020
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
../tools/intel_panel_fitter.c: In function ‘change_screen_size’:
../tools/intel_panel_fitter.c:183:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
183 | pos_x = abs((info.tot_width - dst_width)) / 2;
| ^~~
../tools/intel_panel_fitter.c:184:10: warning: taking the absolute value of unsigned type ‘uint32_t’ {aka ‘unsigned int’} has no effect [-Wabsolute-value]
184 | pos_y = abs((info.tot_height - dst_height)) / 2;
| ^~~
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_panel_fitter.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/intel_panel_fitter.c b/tools/intel_panel_fitter.c
index 640787053b16..c6ee2101cd77 100644
--- a/tools/intel_panel_fitter.c
+++ b/tools/intel_panel_fitter.c
@@ -72,12 +72,12 @@ struct pipe_info {
bool enabled;
bool pf_enabled;
uint32_t interlace_mode;
- uint32_t tot_width; /* htotal */
- uint32_t tot_height; /* vtotal */
- uint32_t src_width; /* pipesrc.x */
- uint32_t src_height; /* pipesrc.y */
- uint32_t dst_width; /* pf_win_sz.x */
- uint32_t dst_height; /* pf_win_sz.y */
+ int tot_width; /* htotal */
+ int tot_height; /* vtotal */
+ int src_width; /* pipesrc.x */
+ int src_height; /* pipesrc.y */
+ int dst_width; /* pf_win_sz.x */
+ int dst_height; /* pf_win_sz.y */
};
static void read_pipe_info(int intel_pipe, struct pipe_info *info)
@@ -155,7 +155,7 @@ static void dump_info(void)
static int change_screen_size(int intel_pipe, int x, int y)
{
struct pipe_info info;
- uint32_t dst_width, dst_height, pos_x, pos_y;
+ int dst_width, dst_height, pos_x, pos_y;
uint32_t ctrl1_val;
uint32_t win_pos_val;
uint32_t win_sz_val;
--
2.24.1
More information about the igt-dev
mailing list