Skip to content

displayid.c: prevent int promotion warning

Consolatis requested to merge Consolatis/libdisplay-info:fix/conv_warn into main

Fixes following warning

../displayid.c: In function ‘parse_tiled_topo_block’:
../displayid.c:298:29: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
  298 |  tiled_topo->product_code = data[0x13] | (uint16_t)(data[0x14] << 8);
      |                             ^~~~

Signed-off-by: Consolatis 40171-Consolatis@users.noreply.gitlab.freedesktop.org

Merge request reports

Loading