[Gc] Fwd: [bdwgc] 7.4.0: include/gc_alloc ator.h defines and assigns at the same time (#41)

Ivan Maidanski <ivmai-JGs/[email protected]> Sun, 18 May 2014 20:15:02 +0400
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
 Forwarding to ML...


-------- Forwarded message --------
From: marksolaris <[email protected]>
To: ivmai/bdwgc <[email protected]>
Date: Sun, 11 May 2014, 21:18 -07:00
Subject: [bdwgc] 7.4.0: include/gc_allocator.h defines and assigns at the same time (#41)

Using Solaris with Sun Studio:
"./include/gc_allocator.h", line 132: Warning: The variable traits has not yet been assigned a value.
This appears to be the same issue as  #39
Patching it stops the warning.
build11s64:/var/tmp/bdw-gc-7.4.0 root# diff -ru include/gc_allocator.h.orig include/gc_allocator.h
--- include/gc_allocator.h.orig 2014-05-12 14:14:39.548882685 +1000
+++ include/gc_allocator.h      2014-05-12 14:14:56.545729025 +1000
@@ -125,7 +125,7 @@

   // GC_n is permitted to be 0.  The C++ standard says nothing about what
   // the return value is when GC_n == 0.
-  GC_Tp* allocate(size_type GC_n, const void* = 0) {
+  GC_Tp* allocate(size_type GC_n, const void*) {
     GC_type_traits<GC_Tp> traits;
     return static_cast<GC_Tp *>
             (GC_selective_alloc(GC_n * sizeof(GC_Tp),
@@ -202,7 +202,7 @@

   // GC_n is permitted to be 0.  The C++ standard says nothing about what
   // the return value is when GC_n == 0.
-  GC_Tp* allocate(size_type GC_n, const void* = 0) {
+  GC_Tp* allocate(size_type GC_n, const void*) {
     GC_type_traits<GC_Tp> traits;
     return static_cast<GC_Tp *>
             (GC_selective_alloc(GC_n * sizeof(GC_Tp),
@@ -281,7 +281,7 @@

   // GC_n is permitted to be 0.  The C++ standard says nothing about what
   // the return value is when GC_n == 0.
-  GC_Tp* allocate(size_type GC_n, const void* = 0) {
+  GC_Tp* allocate(size_type GC_n, const void*) {
     return static_cast<GC_Tp*>(GC_MALLOC_UNCOLLECTABLE(GC_n * sizeof(GC_Tp)));
   }

—
Reply to this email directly or  view it on GitHub .

_______________________________________________
bdwgc mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/bdwgc