[Mesa-dev] [PATCH kmscube 1/7] kmscube.c: remove uninitialized var returned
Eric Engestrom
eric.engestrom at imgtec.com
Tue Mar 14 13:33:51 UTC 2017
`ret` isn't used by anything, so remove it as well.
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
kmscube.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kmscube.c b/kmscube.c
index 91e0104..8057e66 100644
--- a/kmscube.c
+++ b/kmscube.c
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
const char *device = "/dev/dri/card0";
enum mode mode = SMOOTH;
int atomic = 0;
- int opt, ret;
+ int opt;
while ((opt = getopt_long_only(argc, argv, shortopts, longopts, NULL)) != -1) {
switch (opt) {
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
drm = init_drm_legacy(device);
if (!drm) {
printf("failed to initialize %s DRM\n", atomic ? "atomic" : "legacy");
- return ret;
+ return -1;
}
gbm = init_gbm(drm->fd, drm->mode->hdisplay, drm->mode->vdisplay);
--
Cheers,
Eric
More information about the mesa-dev
mailing list