[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57620] trunk/blender/source/blender/ blenlib: reduce sign comparisons for ghash and add more strict warnings for gcc.
Dalai Felinto
dfelinto at gmail.com
Sat Jun 22 09:56:22 CEST 2013
Hi Campbell,
That (or a related commit) produced this build error in OSX (cmake+make):
"""
blender/source/blender/blenlib/intern/BLI_ghash.c:46: warning: unknown
option after ‘#pragma GCC diagnostic’ kind
blender/source/blender/blenlib/intern/BLI_ghash.c: In function ‘BLI_ghash_new’:
blender/source/blender/blenlib/intern/BLI_ghash.c:65: error: passing
argument 1 of ‘BLI_mempool_create’ with different width due to
prototype
"""
full-log:
http://www.pasteall.org/43396
Too late for me to look at it, but I hope the fix is simple.
Thanks,
Dalai
--
blendernetwork.org/member/dalai-felinto
www.dalaifelinto.com
2013/6/20 Campbell Barton <ideasman42 at gmail.com>:
> Revision: 57620
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57620
> Author: campbellbarton
> Date: 2013-06-20 19:39:29 +0000 (Thu, 20 Jun 2013)
> Log Message:
> -----------
> reduce sign comparisons for ghash and add more strict warnings for gcc.
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/blenlib/BLI_ghash.h
> trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
> trunk/blender/source/blender/blenlib/intern/BLI_heap.c
> trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
>
> Modified: trunk/blender/source/blender/blenlib/BLI_ghash.h
> ===================================================================
> --- trunk/blender/source/blender/blenlib/BLI_ghash.h 2013-06-20 19:19:11 UTC (rev 57619)
> +++ trunk/blender/source/blender/blenlib/BLI_ghash.h 2013-06-20 19:39:29 UTC (rev 57620)
> @@ -60,7 +60,7 @@
>
> typedef struct GHashIterator {
> GHash *gh;
> - int curBucket;
> + unsigned int curBucket;
> struct Entry *curEntry;
> } GHashIterator;
>
>
> Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
> ===================================================================
> --- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2013-06-20 19:19:11 UTC (rev 57619)
> +++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c 2013-06-20 19:39:29 UTC (rev 57620)
> @@ -44,6 +44,8 @@
>
> #ifdef __GNUC__
> # pragma GCC diagnostic error "-Wsign-conversion"
> +# pragma GCC diagnostic error "-Wsign-compare"
> +# pragma GCC diagnostic error "-Wconversion"
> #endif
>
> const unsigned int hashsizes[] = {
> @@ -152,7 +154,7 @@
>
> void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
> {
> - int i;
> + unsigned int i;
>
> if (keyfreefp || valfreefp) {
> for (i = 0; i < gh->nbuckets; i++) {
> @@ -220,7 +222,7 @@
>
> void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
> {
> - int i;
> + unsigned int i;
>
> if (keyfreefp || valfreefp) {
> for (i = 0; i < gh->nbuckets; i++) {
> @@ -252,7 +254,7 @@
> GHashIterator *ghi = MEM_mallocN(sizeof(*ghi), "ghash iterator");
> ghi->gh = gh;
> ghi->curEntry = NULL;
> - ghi->curBucket = -1;
> + ghi->curBucket = (unsigned int)-1;
> while (!ghi->curEntry) {
> ghi->curBucket++;
> if (ghi->curBucket == ghi->gh->nbuckets)
> @@ -265,7 +267,7 @@
> {
> ghi->gh = gh;
> ghi->curEntry = NULL;
> - ghi->curBucket = -1;
> + ghi->curBucket = (unsigned int)-1;
> while (!ghi->curEntry) {
> ghi->curBucket++;
> if (ghi->curBucket == ghi->gh->nbuckets)
>
> Modified: trunk/blender/source/blender/blenlib/intern/BLI_heap.c
> ===================================================================
> --- trunk/blender/source/blender/blenlib/intern/BLI_heap.c 2013-06-20 19:19:11 UTC (rev 57619)
> +++ trunk/blender/source/blender/blenlib/intern/BLI_heap.c 2013-06-20 19:39:29 UTC (rev 57620)
> @@ -41,6 +41,8 @@
>
> #ifdef __GNUC__
> # pragma GCC diagnostic error "-Wsign-conversion"
> +# pragma GCC diagnostic error "-Wsign-compare"
> +# pragma GCC diagnostic error "-Wconversion"
> #endif
>
> /***/
>
> Modified: trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
> ===================================================================
> --- trunk/blender/source/blender/blenlib/intern/BLI_mempool.c 2013-06-20 19:19:11 UTC (rev 57619)
> +++ trunk/blender/source/blender/blenlib/intern/BLI_mempool.c 2013-06-20 19:39:29 UTC (rev 57620)
> @@ -45,6 +45,8 @@
>
> #ifdef __GNUC__
> # pragma GCC diagnostic error "-Wsign-conversion"
> +# pragma GCC diagnostic error "-Wsign-compare"
> +# pragma GCC diagnostic error "-Wconversion"
> #endif
>
> /* note: copied from BLO_blend_defs.h, don't use here because we're in BLI */
> @@ -102,8 +104,8 @@
> }
>
> /* set the elem size */
> - if (esize < MEMPOOL_ELEM_SIZE_MIN) {
> - esize = MEMPOOL_ELEM_SIZE_MIN;
> + if (esize < (int)MEMPOOL_ELEM_SIZE_MIN) {
> + esize = (int)MEMPOOL_ELEM_SIZE_MIN;
> }
>
> if (flag & BLI_MEMPOOL_ALLOW_ITER) {
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
More information about the Bf-committers
mailing list