add option to write PDFs from gm
fix some compile warnings (reorder initializers, init local ptr)



git-svn-id: http://skia.googlecode.com/svn/trunk@642 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 9aefd0a..fec9a4f 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -131,10 +131,10 @@
 }
 
 SkPDFDevice::SkPDFDevice(int width, int height)
-    : fWidth(width),
+    : SkDevice(NULL, makeABitmap(width, height), false),
+	  fWidth(width),
       fHeight(height),
-      fGraphicStackIndex(0),
-      SkDevice(NULL, makeABitmap(width, height), false) {
+      fGraphicStackIndex(0) {
     fGraphicStack[0].fColor = SK_ColorBLACK;
     fGraphicStack[0].fTextSize = SK_ScalarNaN;  // This has no default value.
     fGraphicStack[0].fTextScaleX = SK_Scalar1;
diff --git a/src/pdf/SkPDFImage.cpp b/src/pdf/SkPDFImage.cpp
index 65b9b24..2162eae 100644
--- a/src/pdf/SkPDFImage.cpp
+++ b/src/pdf/SkPDFImage.cpp
@@ -29,7 +29,7 @@
 namespace {
 
 SkMemoryStream* extractImageData(const SkBitmap& bitmap) {
-    SkMemoryStream* result;
+    SkMemoryStream* result = NULL;
 
     bitmap.lockPixels();
     switch (bitmap.getConfig()) {