commit | 56be915e27ceff274a9d10ac1201ff0407c134fc | [log] [tgz] |
---|---|---|
author | Pekka Paalanen <[email protected]> | Thu Oct 13 13:03:16 2022 +0300 |
committer | Pekka Paalanen <[email protected]> | Thu Oct 13 13:03:16 2022 +0300 |
tree | 303f1334c6f75ec0813e0670a216c711723f67fa | |
parent | 619fc30c7ba452e17f04b446ffa4d8acd34e5da1 [diff] |
edid: fix uint16_t conversion warning ../../git/weston/subprojects/display-info/edid.c: In function ‘decode_chromaticity_coord’: ../../git/weston/subprojects/display-info/edid.c:250:8: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Wconversion] 250 | raw = (uint16_t) (hi << 2) | lo; | ^ Apparently the cast applies to (hi << 2), then bitwise-or implicitly promotes to signed int, and that gets assigned to uint16_t raw. At least gcc 10.2.1 from Debian seems to think so. Fix it by forcing the cast on the complete result. Signed-off-by: Pekka Paalanen <[email protected]>
EDID and DisplayID library.
Goals:
Documentation is available on the website.
Open issues and merge requests on the GitLab project.
In general, the Wayland contribution guidelines should be followed. In particular, each commit must carry a Signed-off-by tag to denote that the submitter adheres to the Developer Certificate of Origin 1.1. This project follows the freedesktop.org Contributor Covenant.
libdisplay-info is built using Meson. It has no dependencies.
meson setup build/ ninja -C build/
The low-level EDID library is tested against edid-decode. test/data/
contains a small collection of EDID blobs and diffs between upstream edid-decode
and our di-edid-decode
clone. Our CI ensures the diffs are up-to-date. A patch should never make the diffs grow larger. To add a new EDID blob or update a diff, use test/edid-decode-diff.sh test/data/<edid>
.
The latest code coverage report is available on GitLab CI.
To fuzz libdisplay-info with AFL, the library needs to be instrumented:
CC=afl-gcc meson build/ ninja -C build/ afl-fuzz -i test/data/ -o afl/ build/di-edid-decode