<div dir="ltr">Richard,<div>        While removing the initialization of <span style="font-size:13px">imageFileType </span>with nil compiles under clang 3.6.0svn, the compilation now emits warnings later in the file...</div><div><br></div><div><div>/sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:621:13: warning: variable 'imageFileType' is</div><div>      used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]</div><div>   else if ([format isEqualToString: @"tiff"])</div><div>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>/sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:630:54: note: uninitialized use occurs here</div><div>   NSData *data = [imageRep representationUsingType: imageFileType properties: properties];</div><div>                                                     ^~~~~~~~~~~~~</div><div>/sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:621:9: note: remove the 'if' if its</div><div>      condition is always true</div><div>   else if ([format isEqualToString: @"tiff"])</div><div>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>/sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:609:4: note: variable 'imageFileType' is</div><div>      declared here</div><div>   NSBitmapImageFileType imageFileType;</div><div>   ^</div></div><div><br></div><div>So you are saying that under -std=c++11, it is impossible to initialize the strongly typed enum imageFileType in order to suppress these warnings?</div><div>                 Jack</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 6:41 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Mon, Apr 20, 2015 at 3:01 PM, Jack Howarth <span dir="ltr"><<a href="mailto:howarth.mailing.lists@gmail.com" target="_blank">howarth.mailing.lists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">   I am running into an error in clang 3.6.0svn with the line...<br><br>   NSBitmapImageFileType imageFileType = nil;<br><br>producing an error of...<br><br>/sw/src/fink.build/rstudio-desktop-0.98.1103-4/rstudio-0.98.1103/src/cpp/desktop-mac/GwtCallbacks.mm:609:26: error: cannot initialize a variable of type 'NSBitmapImageFileType' with an<br>      rvalue of type 'nullptr_t'<br>   NSBitmapImageFileType imageFileType = nil;<br>                         ^               ~~~<br><br>when -std=c++11 is used. Is this an glitch in the compiler? According to...<br><br><a href="http://www.cprogramming.com/c++11/c++11-nullptr-strongly-typed-enum-class.html" target="_blank">http://www.cprogramming.com/c++11/c++11-nullptr-strongly-typed-enum-class.html</a><br><br>shouldn't I I be able to initialize it with std::nullptr_t?</div></blockquote><div><br></div></div></div><div>As far as I can tell, NSBitmapImageFileType is an enum. So no. </div></div></div></div>
</blockquote></div><br></div>