make skcms buildable as c++

Mostly, make casts to and from void* explicit.

Should be able to build as C++ now, with these warning disablers:

    -Wno-c++98-compat-pedantic
    -Wno-c99-extensions
    -Wno-gnu-anonymous-struct
    -Wno-old-style-cast
    -Wno-zero-as-null-pointer-constant

We'll want to keep -Wno-c++98-compat-pedantic anyway (and add
-Wno-c++98-compat for less pedantic incompatibilities.)

-Wno-c99-extensions allows compound literals, designated initializers,
flexible array members.  These are all nice but can be replaced.

-Wno-gnu-anonymous-struct is about our unnamed structs in skcms_Curve.
Not sure what to do there but maybe leave the warning disabled.

-Wno-old-style-cast is something we can clean up if we feel like it.
I think I could be convinced to use static_cast.

-Wno-zero-as-null-pointer-constant is easy to clean up once we switch
to C++, s/NULL/nullptr/g.

    $ clang -Weverything -Wno-padded -Wno-double-promotion -Wno-float-equal -Wno-bad-function-cast -Wno-reserved-id-macro -Wc99-extensions -Wno-c++98-compat-pedantic -Wno-old-style-cast -Wno-zero-as-null-pointer-constant -Wno-c99-extensions -Wno-gnu-anonymous-struct -std=c++11 -x c++ -c skcms.c

Change-Id: I1e71231207dbd94276ea42224ad9f88057e84367
Reviewed-on: https://skia-review.googlesource.com/138984
Auto-Submit: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2 files changed