-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebrew gcc-14 new requirements on C code #633
Conversation
@@ -281,7 +281,7 @@ DestroyImage(XImage *image) | |||
} | |||
|
|||
static unsigned long | |||
GetPixelWrapper(XImage *ximage, Dimension x, Dimension y) | |||
GetPixelWrapper(XImage *ximage, _XtDimension x, _XtDimension y) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not matter, but I would expect _XtPosition to be more a more appropriate type for x and y.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be. I used _XtDimension
because that is the default prototype used in tka.h for the GetPixel function, but this is confusing because the original Dimension is an unsigned int
defined in miniparse.h. In Xutil.h (part of the X11 library, provided on the Mac via XQuartz), XGetPixel uses either int
directly or the x and y are defined within a macro that calls get_pixel (Xlib.h), which uses int
for x and y.
Intrinsic.h in the X11 library specifies _XtDimension as either Dimension
(defined as unsigned short
) or int
depending on whether it is being used with a "wide" variable definition. They also say not to use _XtDimension and similar variable types in client code - not sure if that means XmHTML code.
So either _XtDimension
, int
, unsigned short
or unsigned int
seem to be reasonable choices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, given the prototype, _XtDimension does seem good.
Can you make sure your two SUMA changes are reflected in the 0327 branch? The feel free to merge, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included all changes in the suma20240327 branch too. Tested build against FT05 NL afni_proc script from class data, and all looked good except for numpy2 issues in the QC HTML generation on Mac. Those are outside this pull request. Rerunning with conda-managed numpy1 produced expected QC HTML pages with appropriate visual results.
@afni-rickr - can you do final approval?
What be the QC HTML issues? Let me know if I should take a look. |
gcc-14 is the latest default version for homebrew with
brew install gcc
. That latest version of gcc imposes some C code updates like requiring int declarations for functions that return integers. Updates to ignore some warnings with -Wno-implicit-int (f2c code built from Fortran would need to be updated with each conversion) and a couple small other declaration fixes solves the complaints of this version of the gcc compiler.The libjpeg.a update only occurs in the configure command script it uses to determine compiler properties and not in the AFNI source code.
The libXmHTML code required two small changes for consistent type declarations.