Skip to content

Commit

Permalink
Mac OS: remove 5 compilation warnings of this kind:
Browse files Browse the repository at this point in the history
warning: comparison of function 'CGDataConsumerCreateWithCFData' not equal to a null pointer is always true
note: prefix with the address-of operator to silence this warning



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10747 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Jun 10, 2015
1 parent d408133 commit 416c0d9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Fl_Copy_Surface.cxx
Expand Up @@ -185,7 +185,7 @@ void Fl_Copy_Surface::init_PDF_context(int w, int h)
pdfdata = CFDataCreateMutable(NULL, 0);
CGDataConsumerRef myconsumer;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
if(CGDataConsumerCreateWithCFData != NULL) {
if (&CGDataConsumerCreateWithCFData != NULL) {
myconsumer = CGDataConsumerCreateWithCFData(pdfdata); // 10.4
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Fl_Quartz_Printer.mm
Expand Up @@ -240,7 +240,7 @@ typedef OSStatus (*PMSessionBeginDocumentNoDialog_type)(
{
OSStatus status = PMSessionBeginPageNoDialog(printSession, pageFormat, NULL);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if ( PMSessionGetCGGraphicsContext != NULL ) {
if ( &PMSessionGetCGGraphicsContext != NULL ) {
status = PMSessionGetCGGraphicsContext(printSession, &fl_gc);
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Fl_Window_shape.cxx
Expand Up @@ -337,7 +337,7 @@ void Fl_Window::shape(const Fl_Image* img) {
void Fl_Window::draw() {
if (shape_data_) {
# if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if (shape_data_->mask && (CGContextClipToMask != NULL)) {
if (shape_data_->mask && (&CGContextClipToMask != NULL)) {
CGContextClipToMask(fl_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4
}
CGContextSaveGState(fl_gc);
Expand Down
2 changes: 1 addition & 1 deletion src/Fl_get_key_mac.cxx
Expand Up @@ -244,7 +244,7 @@ int Fl::event_key(int k) {
//: returns true, if that key is pressed right now
int Fl::get_key(int k) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if(CGEventSourceKeyState != NULL) {
if (&CGEventSourceKeyState != NULL) {
return (int)CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, fltk2mac(k) );
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/screen_xywh.cxx
Expand Up @@ -131,7 +131,7 @@ static void screen_init() {
screens[i].width = int(r.size.width);
screens[i].height = int(r.size.height);
//fprintf(stderr,"screen %d %dx%dx%dx%d\n",i,screens[i].x,screens[i].y,screens[i].width,screens[i].height);
if (CGDisplayScreenSize != NULL) {
if (&CGDisplayScreenSize != NULL) {
CGSize s = CGDisplayScreenSize(displays[i]); // from 10.3
dpi_h[i] = screens[i].width / (s.width/25.4);
dpi_v[i] = screens[i].height / (s.height/25.4);
Expand Down

0 comments on commit 416c0d9

Please sign in to comment.