Tidy up compile warnings by cleaning up types.
parent
1802e1a4e7
commit
e4a519635f
|
@ -108,7 +108,8 @@ static void getvm(int fd)
|
||||||
flagname[6] = '\0';
|
flagname[6] = '\0';
|
||||||
|
|
||||||
printf(" %4d 0x%08lx 0x%08lx %3.3s %6.6s 0x%08lx ",
|
printf(" %4d 0x%08lx 0x%08lx %3.3s %6.6s 0x%08lx ",
|
||||||
i, offset, (unsigned long)size, typename, flagname, handle);
|
i, (unsigned long)offset, (unsigned long)size,
|
||||||
|
typename, flagname, (unsigned long)handle);
|
||||||
if (mtrr < 0) printf("none\n");
|
if (mtrr < 0) printf("none\n");
|
||||||
else printf("%4d\n", mtrr);
|
else printf("%4d\n", mtrr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
#include "drmtest.h"
|
#include "drmtest.h"
|
||||||
|
|
||||||
#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
|
#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE
|
||||||
|
@ -60,7 +62,7 @@ int drm_open_matching(const char *pci_glob, int flags)
|
||||||
struct udev_device *device, *parent;
|
struct udev_device *device, *parent;
|
||||||
struct udev_list_entry *entry;
|
struct udev_list_entry *entry;
|
||||||
const char *pci_id, *path;
|
const char *pci_id, *path;
|
||||||
int i, fd;
|
int fd;
|
||||||
|
|
||||||
udev = udev_new();
|
udev = udev_new();
|
||||||
if (udev == NULL) {
|
if (udev == NULL) {
|
||||||
|
|
|
@ -89,7 +89,7 @@ int printMode(struct drm_mode_modeinfo *mode)
|
||||||
|
|
||||||
int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, uint64_t value)
|
int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, uint64_t value)
|
||||||
{
|
{
|
||||||
const unsigned char *name = NULL;
|
const char *name = NULL;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
printf("Property: %s\n", props->name);
|
printf("Property: %s\n", props->name);
|
||||||
|
@ -101,7 +101,7 @@ int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, uint64_t
|
||||||
if (props->count_values) {
|
if (props->count_values) {
|
||||||
printf("\tvalues :");
|
printf("\tvalues :");
|
||||||
for (j = 0; j < props->count_values; j++)
|
for (j = 0; j < props->count_values; j++)
|
||||||
printf(" %lld", props->values[j]);
|
printf(" %llu", props->values[j]);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ int printProperty(int fd, drmModeResPtr res, drmModePropertyPtr props, uint64_t
|
||||||
printf("blob is %d length, %08X\n", blob->length, *(uint32_t *)blob->data);
|
printf("blob is %d length, %08X\n", blob->length, *(uint32_t *)blob->data);
|
||||||
drmModeFreePropertyBlob(blob);
|
drmModeFreePropertyBlob(blob);
|
||||||
} else {
|
} else {
|
||||||
printf("error getting blob %lld\n", value);
|
printf("error getting blob %llu\n", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -169,7 +169,7 @@ int printConnector(int fd, drmModeResPtr res, drmModeConnectorPtr connector, uin
|
||||||
|
|
||||||
if (modes) {
|
if (modes) {
|
||||||
for (i = 0; i < connector->count_modes; i++) {
|
for (i = 0; i < connector->count_modes; i++) {
|
||||||
mode = &connector->modes[i];
|
mode = (struct drm_mode_modeinfo *)&connector->modes[i];
|
||||||
printMode(mode);
|
printMode(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
#include "xf86drmMode.h"
|
#include "xf86drmMode.h"
|
||||||
|
@ -255,9 +256,10 @@ void dump_framebuffers(void)
|
||||||
resources->fbs[i], strerror(errno));
|
resources->fbs[i], strerror(errno));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf("%d\t(%dx%d)\t%d\n",
|
printf("%u\t(%ux%u)\t%u\n",
|
||||||
fb->fb_id,
|
fb->fb_id,
|
||||||
fb->width, fb->height);
|
fb->width, fb->height,
|
||||||
|
fb->pitch);
|
||||||
|
|
||||||
drmModeFreeFB(fb);
|
drmModeFreeFB(fb);
|
||||||
}
|
}
|
||||||
|
@ -272,7 +274,7 @@ void dump_framebuffers(void)
|
||||||
* can bind it with a free crtc.
|
* can bind it with a free crtc.
|
||||||
*/
|
*/
|
||||||
struct connector {
|
struct connector {
|
||||||
int id;
|
uint32_t id;
|
||||||
char mode_str[64];
|
char mode_str[64];
|
||||||
drmModeModeInfo *mode;
|
drmModeModeInfo *mode;
|
||||||
drmModeEncoder *encoder;
|
drmModeEncoder *encoder;
|
||||||
|
@ -287,7 +289,7 @@ static void
|
||||||
connector_find_mode(struct connector *c)
|
connector_find_mode(struct connector *c)
|
||||||
{
|
{
|
||||||
drmModeConnector *connector;
|
drmModeConnector *connector;
|
||||||
int i, j, size, ret, width, height;
|
int i, j;
|
||||||
|
|
||||||
/* First, find the connector & mode */
|
/* First, find the connector & mode */
|
||||||
c->mode = NULL;
|
c->mode = NULL;
|
||||||
|
@ -358,7 +360,7 @@ create_test_buffer(drm_intel_bufmgr *bufmgr,
|
||||||
{
|
{
|
||||||
drm_intel_bo *bo;
|
drm_intel_bo *bo;
|
||||||
unsigned int *fb_ptr;
|
unsigned int *fb_ptr;
|
||||||
int size, ret, i, stride;
|
int size, i, stride;
|
||||||
div_t d;
|
div_t d;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
|
@ -472,9 +474,7 @@ create_grey_buffer(drm_intel_bufmgr *bufmgr,
|
||||||
int width, int height, int *stride_out, drm_intel_bo **bo_out)
|
int width, int height, int *stride_out, drm_intel_bo **bo_out)
|
||||||
{
|
{
|
||||||
drm_intel_bo *bo;
|
drm_intel_bo *bo;
|
||||||
unsigned int *fb_ptr;
|
int size, ret, stride;
|
||||||
int size, ret, i, stride;
|
|
||||||
div_t d;
|
|
||||||
|
|
||||||
/* Mode size at 32 bpp */
|
/* Mode size at 32 bpp */
|
||||||
stride = width * 4;
|
stride = width * 4;
|
||||||
|
@ -509,7 +509,6 @@ page_flip_handler(int fd, unsigned int frame,
|
||||||
{
|
{
|
||||||
struct connector *c;
|
struct connector *c;
|
||||||
unsigned int new_fb_id;
|
unsigned int new_fb_id;
|
||||||
int len, ms;
|
|
||||||
struct timeval end;
|
struct timeval end;
|
||||||
double t;
|
double t;
|
||||||
|
|
||||||
|
@ -536,13 +535,10 @@ page_flip_handler(int fd, unsigned int frame,
|
||||||
static void
|
static void
|
||||||
set_mode(struct connector *c, int count, int page_flip)
|
set_mode(struct connector *c, int count, int page_flip)
|
||||||
{
|
{
|
||||||
drmModeConnector *connector;
|
|
||||||
drmModeEncoder *encoder = NULL;
|
|
||||||
struct drm_mode_modeinfo *mode = NULL;
|
|
||||||
drm_intel_bufmgr *bufmgr;
|
drm_intel_bufmgr *bufmgr;
|
||||||
drm_intel_bo *bo, *other_bo;
|
drm_intel_bo *bo, *other_bo;
|
||||||
unsigned int fb_id, other_fb_id;
|
unsigned int fb_id, other_fb_id;
|
||||||
int i, j, ret, width, height, x, stride;
|
int i, ret, width, height, x, stride;
|
||||||
drmEventContext evctx;
|
drmEventContext evctx;
|
||||||
|
|
||||||
width = 0;
|
width = 0;
|
||||||
|
@ -676,7 +672,7 @@ static int page_flipping_supported(int fd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return gp.value;
|
return *gp.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
@ -685,8 +681,8 @@ int main(int argc, char **argv)
|
||||||
int encoders = 0, connectors = 0, crtcs = 0, framebuffers = 0;
|
int encoders = 0, connectors = 0, crtcs = 0, framebuffers = 0;
|
||||||
int test_vsync = 0;
|
int test_vsync = 0;
|
||||||
char *modules[] = { "i915", "radeon" };
|
char *modules[] = { "i915", "radeon" };
|
||||||
char *modeset = NULL, *mode, *connector;
|
char *modeset = NULL;
|
||||||
int i, connector_id, count = 0;
|
int i, count = 0;
|
||||||
struct connector con_args[2];
|
struct connector con_args[2];
|
||||||
|
|
||||||
opterr = 0;
|
opterr = 0;
|
||||||
|
@ -715,11 +711,11 @@ int main(int argc, char **argv)
|
||||||
con_args[count].crtc = -1;
|
con_args[count].crtc = -1;
|
||||||
if (sscanf(optarg, "%d:%64s",
|
if (sscanf(optarg, "%d:%64s",
|
||||||
&con_args[count].id,
|
&con_args[count].id,
|
||||||
&con_args[count].mode_str) != 2 &&
|
con_args[count].mode_str) != 2 &&
|
||||||
sscanf(optarg, "%d@%d:%64s",
|
sscanf(optarg, "%d@%d:%64s",
|
||||||
&con_args[count].id,
|
&con_args[count].id,
|
||||||
&con_args[count].crtc,
|
&con_args[count].crtc,
|
||||||
&con_args[count].mode_str) != 3)
|
con_args[count].mode_str) != 3)
|
||||||
usage(argv[0]);
|
usage(argv[0]);
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -265,11 +265,8 @@ int drmSLLookupNeighbors(void *l, unsigned long key,
|
||||||
{
|
{
|
||||||
SkipListPtr list = (SkipListPtr)l;
|
SkipListPtr list = (SkipListPtr)l;
|
||||||
SLEntryPtr update[SL_MAX_LEVEL + 1];
|
SLEntryPtr update[SL_MAX_LEVEL + 1];
|
||||||
SLEntryPtr entry;
|
|
||||||
int retcode = 0;
|
int retcode = 0;
|
||||||
|
|
||||||
entry = SLLocate(list, key, update);
|
|
||||||
|
|
||||||
*prev_key = *next_key = key;
|
*prev_key = *next_key = key;
|
||||||
*prev_value = *next_value = NULL;
|
*prev_value = *next_value = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue