diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-10-18 22:17:03 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-10-18 22:17:03 -0700 |
commit | ca5ed1edbb7a71ea166868b80dd02a210c2a8f05 (patch) | |
tree | 2ecce69f7466d37454383c31cb45b082d3c67328 | |
parent | 8a4d6f5bd95f5ad7608a7871bc6822935e4a191b (diff) |
Make ImageEncodings unsigned
Starts at 0 and increments to count encodings - should never go negative.
Fixes clang warnings:
xvinfo.c:184:31: warning: implicit conversion changes signedness: 'int' to
'unsigned int' [-Wsign-conversion]
if (nencode - ImageEncodings) {
~ ^~~~~~~~~~~~~~
xvinfo.c:186:39: warning: implicit conversion changes signedness: 'int' to
'unsigned int' [-Wsign-conversion]
nencode - ImageEncodings);
~ ^~~~~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xvinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -174,7 +174,7 @@ main(int argc, char *argv[]) XvQueryEncodings(dpy, ainfo[j].base_id, &nencode, &encodings); if (encodings && nencode) { - int ImageEncodings = 0; + unsigned int ImageEncodings = 0; for (n = 0; n < nencode; n++) { if (!strcmp(encodings[n].name, "XV_IMAGE")) |