Silence compiler warnings
cover Silence compiler warnings
Short follow up to my earlier series "The rocky road to building with -Wextra". This gets rid of ~20 warnings, with ~45 remainig.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/4 tests: remove unused variables
As kindly pointed out by GCC.
--- tests/name_from_fd.c | 3 +-- tests/updatedraw.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
tests/name_from_fd.c +1 -2
@@ -40,8 +40,7 @@*/ int main (int argc,char **argv) { -int fd, ret; -drm_set_version_t sv, version; +int fd;const char *name ="/dev/dri/card0" ;char *v;
tests/updatedraw.c +1 -1
@@ -122,7 +122,7 @@ static int rm_drawable(int fd, int drawable, int fail)*/ int main (int argc,char **argv) { -int fd, ret, d1, d2; +int fd, d1, d2;if (getuid () !=0 ) {fprintf (stderr,"updatedraw test requires root, skipping\n" );
Signature · 6 lines
2.3.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 exynos_fimg2d_test: remove unused variables
In reply to Emil Velikov--- tests/exynos/exynos_fimg2d_test.c | 5 ----- 1 file changed, 5 deletions(-)
tests/exynos/exynos_fimg2d_test.c +0 -5
@@ -269,7 +269,6 @@ static int g2d_copy_test(struct exynos_device *dev, struct exynos_bo *src, {struct g2d_context *ctx;struct g2d_image src_img, dst_img; -unsigned int count;unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;unsigned long userptr, size;int ret;
@@ -353,7 +352,6 @@ static int g2d_copy_with_scale_test(struct exynos_device *dev, {struct g2d_context *ctx;struct g2d_image src_img, dst_img; -unsigned int count;unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;unsigned long userptr, size;int ret;
@@ -442,7 +440,6 @@ static int g2d_blend_test(struct exynos_device *dev, {struct g2d_context *ctx;struct g2d_image src_img, dst_img; -unsigned int count;unsigned int src_x, src_y, dst_x, dst_y, img_w, img_h;unsigned long userptr, size;int ret;
@@ -557,7 +554,6 @@ int main(int argc, char **argv)struct exynos_device *dev;struct exynos_bo *bo, *src;struct connector con; -char *modeset =NULL ;unsigned int fb_id;uint32_t handles[4 ] = {0 }, pitches[4 ] = {0 }, offsets[4 ] = {0 };drmModeRes *resources;
@@ -573,7 +569,6 @@ int main(int argc, char **argv)while ((c =getopt (argc, argv, optstr)) !=-1 ) {switch (c) {case 's' : - modeset =strdup (optarg); con.crtc =-1 ; if (sscanf(optarg, "%d:0x%64s", &con.id,
Signature · 6 lines
2.3.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 exynos_fimg2d_test: remove unused function connector_find_plane()
In reply to Emil Velikov--- tests/exynos/exynos_fimg2d_test.c | 31 ------------------------------- 1 file changed, 31 deletions(-)
tests/exynos/exynos_fimg2d_test.c +0 -31
@@ -142,37 +142,6 @@ static void connector_find_mode(int fd, struct connector *c, c->crtc = c->encoder->crtc_id; } -static int connector_find_plane (int fd,unsigned int *plane_id) -{ -drmModePlaneRes *plane_resources; -drmModePlane *ovr; -int i; - - plane_resources =drmModeGetPlaneResources (fd); -if (!plane_resources) { -fprintf (stderr,"drmModeGetPlaneResources failed: %s\n" , -strerror (errno)); -return -1 ; - } - -for (i =0 ; i < plane_resources->count_planes; i++) { - plane_id[i] =0 ; - - ovr =drmModeGetPlane (fd, plane_resources->planes[i]); -if (!ovr) { -fprintf (stderr,"drmModeGetPlane failed: %s\n" , -strerror (errno)); -continue ; - } - -if (ovr->possible_crtcs & (1 <<0 )) - plane_id[i] = ovr->plane_id; -drmModeFreePlane (ovr); - } - -return 0 ; -} -static int drm_set_crtc (struct exynos_device *dev,struct connector *c,unsigned int fb_id) {
Signature · 6 lines
2.3.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 tests/radeon: set the list* functions as inline
In reply to Emil VelikovTo silence the chatty compiler.
As a future work we may want to merge these with libdrm_lists.h
--- tests/radeon/list.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tests/radeon/list.h +6 -6
@@ -44,13 +44,13 @@ struct list_headstruct list_head *next; }; -static void list_inithead (struct list_head *item) +static inline void list_inithead (struct list_head *item) { item->prev = item; item->next = item; } -static void list_add (struct list_head *item,struct list_head *list) +static inline void list_add (struct list_head *item,struct list_head *list) { item->prev = list; item->next = list->next;
@@ -58,7 +58,7 @@ static void list_add(struct list_head *item, struct list_head *list) list->next = item; } -static void list_addtail (struct list_head *item,struct list_head *list) +static inline void list_addtail (struct list_head *item,struct list_head *list) { item->next = list; item->prev = list->prev;
@@ -66,7 +66,7 @@ static void list_addtail(struct list_head *item, struct list_head *list) list->prev = item; } -static void list_replace (struct list_head *from,struct list_head *to) +static inline void list_replace (struct list_head *from,struct list_head *to) { to->prev = from->prev; to->next = from->next;
@@ -74,13 +74,13 @@ static void list_replace(struct list_head *from, struct list_head *to) from->prev->next = to; } -static void list_del (struct list_head *item) +static inline void list_del (struct list_head *item) { item->prev->next = item->next; item->next->prev = item->prev; } -static void list_delinit (struct list_head *item) +static inline void list_delinit (struct list_head *item) { item->prev->next = item->next; item->next->prev = item->prev;
Signature · 6 lines
2.3.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
you can add
to 1,2, and 4.
I think 3 needs someone from exynos to say whether the function should not be used somewhere (just to be on the safe side).
jan
Quoted 9 lines · Emil Velikov
Short follow up to my earlier series "The rocky road to building with
(quoted diff) +0
-2-Wextra". This gets rid of ~20 warnings, with ~45 remainig. -Emil_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 1 line
Jan Vesely <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Jan Vesely
Hi,
you can add
Reviewed-by Jan Vesely <[email protected]>to 1,2, and 4.
I think 3 needs someone from exynos to say whether the function should not be used somewhere (just to be on the safe side).
Great, thanks.
For anyone interested I will give it a few days, and I'll push both series (minus patch 3 here).
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Emil Velikov
AppliedQuoted 9 lines · Emil Velikov
Quoted 8 lines · Jan Vesely
Hi,
you can add
Reviewed-by Jan Vesely <[email protected]>to 1,2, and 4.
I think 3 needs someone from exynos to say whether the function should not be used somewhere (just to be on the safe side).
Quoted 5 lines
Great, thanks.
For anyone interested I will give it a few days, and I'll push both series (minus patch 3 here).
Pushed to master.
We have just gained some 40+ build warnings. Lucky us :-P
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel