summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-10-18 22:17:03 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-10-18 22:17:03 -0700
commitca5ed1edbb7a71ea166868b80dd02a210c2a8f05 (patch)
tree2ecce69f7466d37454383c31cb45b082d3c67328
parent8a4d6f5bd95f5ad7608a7871bc6822935e4a191b (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xvinfo.c b/xvinfo.c
index d24aa5b..951ab22 100644
--- a/xvinfo.c
+++ b/xvinfo.c
@@ -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"))