Opened 6 years ago

Closed 5 years ago

#12971 closed Bugs (fixed)

g++ on Windows: warning: converting to non-pointer type from NULL

Reported by: Fabian Meyer <mail@…> Owned by: Andy Tompkins
Milestone: Boost 1.66.0 Component: uuid
Version: Boost 1.63.0 Severity: Problem
Keywords: uuid, windows, warning, conversion, non-pointer, null Cc:

Description

The following minimal program "error.cpp" generates the warning:

#include <boost/uuid/random_generator.hpp>

int main()
{
    boost::uuids::uuid id = boost::uuids::random_generator()();
}

Compiling on Windows (MinGW) with

g++ -I D:/libraries/boost_1_63_0/ error.cpp

yields the following message:

In file included from D:/libraries/boost_1_63_0/boost/uuid/random_generator.hpp:12:0,
                 from error.cpp:1:
D:/libraries/boost_1_63_0/boost/uuid/seed_rng.hpp: In constructor 'boost::uuids::detail::seed_rng::seed_rng()':
D:/libraries/boost_1_63_0/boost/uuid/seed_rng.hpp:96:23: warning: converting to non-pointer type 'boost::detail::winapi::HCRYPTPROV_ {aka long unsigned int}' from NULL [-Wconversion-null]
         , random_(NULL)
                       ^
D:/libraries/boost_1_63_0/boost/uuid/seed_rng.hpp:106:21: warning: converting to non-pointer type 'boost::detail::winapi::HCRYPTPROV_ {aka long unsigned int}' from NULL [-Wconversion-null]
             random_ = NULL;
                     ^

Change History (2)

comment:1 by James E. King, III <jking@…>, 5 years ago

comment:2 by James E. King, III, 5 years ago

Milestone: To Be DeterminedBoost 1.66.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.