libdrm: fix warnings in mode code
parent
43891ff2d0
commit
4aa7efe398
|
@ -37,6 +37,7 @@
|
||||||
*/
|
*/
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "xf86drmMode.h"
|
#include "xf86drmMode.h"
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
|
@ -125,7 +126,6 @@ void drmModeFreeOutput(drmModeOutputPtr ptr)
|
||||||
drmModeResPtr drmModeGetResources(int fd)
|
drmModeResPtr drmModeGetResources(int fd)
|
||||||
{
|
{
|
||||||
struct drm_mode_card_res res;
|
struct drm_mode_card_res res;
|
||||||
int i;
|
|
||||||
drmModeResPtr r = 0;
|
drmModeResPtr r = 0;
|
||||||
|
|
||||||
memset(&res, 0, sizeof(struct drm_mode_card_res));
|
memset(&res, 0, sizeof(struct drm_mode_card_res));
|
||||||
|
@ -196,7 +196,7 @@ int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
|
||||||
f.depth = depth;
|
f.depth = depth;
|
||||||
f.handle = bo_handle;
|
f.handle = bo_handle;
|
||||||
|
|
||||||
if (ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f))
|
if ((ret = ioctl(fd, DRM_IOCTL_MODE_ADDFB, &f)))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
*buf_id = f.buffer_id;
|
*buf_id = f.buffer_id;
|
||||||
|
@ -243,7 +243,6 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
|
||||||
{
|
{
|
||||||
struct drm_mode_crtc crtc;
|
struct drm_mode_crtc crtc;
|
||||||
drmModeCrtcPtr r;
|
drmModeCrtcPtr r;
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
crtc.count_outputs = 0;
|
crtc.count_outputs = 0;
|
||||||
crtc.outputs = 0;
|
crtc.outputs = 0;
|
||||||
|
@ -276,10 +275,6 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
|
||||||
r->possibles = crtc.possibles;
|
r->possibles = crtc.possibles;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
err_allocs:
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -433,8 +428,7 @@ drmModePropertyPtr drmModeGetProperty(int fd, uint32_t property_id)
|
||||||
{
|
{
|
||||||
struct drm_mode_get_property prop;
|
struct drm_mode_get_property prop;
|
||||||
drmModePropertyPtr r;
|
drmModePropertyPtr r;
|
||||||
struct drm_mode_property_blob *blob_tmp;
|
|
||||||
int i;
|
|
||||||
prop.prop_id = property_id;
|
prop.prop_id = property_id;
|
||||||
prop.count_enum_blobs = 0;
|
prop.count_enum_blobs = 0;
|
||||||
prop.count_values = 0;
|
prop.count_values = 0;
|
||||||
|
@ -549,7 +543,7 @@ int drmModeOutputSetProperty(int fd, uint32_t output_id, uint32_t property_id,
|
||||||
osp.prop_id = property_id;
|
osp.prop_id = property_id;
|
||||||
osp.value = value;
|
osp.value = value;
|
||||||
|
|
||||||
if (ret = ioctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp))
|
if ((ret = ioctl(fd, DRM_IOCTL_MODE_SETPROPERTY, &osp)))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -565,8 +559,6 @@ int drmCheckModesettingSupported(const char *busid)
|
||||||
{
|
{
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
char pci_dev_dir[1024];
|
char pci_dev_dir[1024];
|
||||||
char *bus_id_path;
|
|
||||||
char *bus_type;
|
|
||||||
int domain, bus, dev, func;
|
int domain, bus, dev, func;
|
||||||
DIR *sysdir;
|
DIR *sysdir;
|
||||||
struct dirent *dent;
|
struct dirent *dent;
|
||||||
|
|
Loading…
Reference in New Issue