input: Fix compiler error with GCC 8.0 18/205018/1
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 28 May 2018 08:22:48 +0000 (11:22 +0300)
committerAmit Purwar <amit.purwar@samsung.com>
Mon, 29 Apr 2019 04:12:36 +0000 (09:42 +0530)
commit13b2bb4b7d22ba0a82641b1a66f52a999a04a235
treeccb08af8950a525ecfe381e374aed2f2d743deeb
parent222d7b7ec440b2e313edf93e9d94a812793b87f2
input: Fix compiler error with GCC 8.0

This fixes the following error:

profiles/input/device.c: In function ‘hidp_add_connection’:
profiles/input/device.c:677:47: error: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size between 0 and 127 [-Werror=format-truncation=]
    snprintf(req->name, sizeof(req->name), "%s %s",
                                               ^~
         pname, sdesc);
                ~~~~~
profiles/input/device.c:677:4: note: ‘snprintf’ output between 2 and 256 bytes into a destination of size 128
    snprintf(req->name, sizeof(req->name), "%s %s",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         pname, sdesc);

Change-Id: I36f1c408e8e30e95f81d97f5eab182cbec4c80d2
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
profiles/input/device.c