Commit Graph

15 Commits

Author SHA1 Message Date
Darryl L. Miles b80279c6db grOGL1.c: HashLookOnly() using X11 Window type a key on LLP64 needs cast 2025-10-04 20:50:31 -04:00
Darryl L. Miles 692c0f2339 grX11su3.c: warning for ClientData compare
MAGIC_WRAPPER build option
2025-10-04 20:50:31 -04:00
Darryl L. Miles 6ed8f17136 textio: create callback typedef cb_textio_input_t 2025-02-23 10:24:40 -05:00
Darryl L. Miles 91bb9935f9 grOGL1.c: use ATTR_UNREACHABLE to help analyser 2025-01-03 09:08:14 +00:00
Darryl L. Miles 55413d6b3a grOGL1.c: GrOGLIconUpdate() potential -1 out-of-bound access
SonarCloud
Access of 'char' element in the region at index -1
https://sonarcloud.io/project/issues?open=AZJB16z6NGfDNup0Rist&id=dlmiles_magic
2024-12-26 13:01:24 -05:00
Darryl L. Miles da80d5c75d grOGL1.c: pipehandler() XEvent processing NULL deref
SonarCloud
Access to field 'w_flags' results in a dereference of a null pointer (loaded from variable 'mw')
https://sonarcloud.io/project/issues?open=AZJB16z6NGfDNup0Risq&id=dlmiles_magic
2024-12-26 13:01:24 -05:00
Darryl L. Miles 54f49829f2 graphics: multiple definition of `various_x11_symbols'
Solution is to make the grX11thread.c and grX11su1[5].c versions
the official location.  Another solution maybe to split them into
their own file grX11common.c that would be shared.

Multiple configurations tested, tested configurations assume X11
is available.  The configuration wording indicates X11 must be
available for all graphics enabled build configurations.

Affected symbols appear to have multiple definitions:
grCursors
grXdpy
grXscrn
pipeRead
pipeWrite
Xhelper
grVisual

GCC14 and linker will not link the final executable due to this.

GCC14 --without-tk --without-tcl
Related issue: https://github.com/RTimothyEdwards/magic/issues/323
2024-10-09 20:35:19 -04:00
Darryl L. Miles e5c3e703c3 HashLookOnly(): passing argument 2 of 'HashLookOnly' makes pointer from integer without a cast
Also HashFind()

GCC14 --without-tk --without-tcl
Related issue: https://github.com/RTimothyEdwards/magic/issues/323
2024-10-09 20:35:19 -04:00
Tim Edwards dba6f99d93 Updated the revision number to go along with the merge of pull
request #325 from Daryl Miles.  Made a few simple style changes
to conform to (what is vaguely defined as) the overall programming
style for magic (passed down from John Ousterhout).
2024-10-01 12:56:31 -04:00
Darryl L. Miles 29ee094074 graphics/grOGL1.c Dereference of null pointer
Looks like the code below requires mw!=NULL to do anything useful.
So when mw==NULL we don't continue processing X11 Event.

SonarCloud
graphics/grOGL1.c:563 Dereference of null pointer
https://sonarcloud.io/project/issues?open=AZJB16z6NGfDNup0Riss&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Darryl L. Miles be258c6557 graphics/grOGL1.c: non-void function does not return a value
Making oglSetProjection() return void, like toglSetProjection()

SonarCloud
graphics/grOGL1.c:408 non-void function does not return a value
https://sonarcloud.io/project/issues?open=AZJB16z6NGfDNup0Riro&id=dlmiles_magic
2024-10-01 12:36:13 -04:00
Alessandro De Laurenzis 68cecd5382 C99 code compat when configured with no TCL support 2022-10-29 06:07:46 +02:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim Edwards 93bcfeb093 Finally worked out how to correctly use the OpenGL general-purpose
frame buffers and render buffers, and use fast frame buffer bit
block transfers to do copies to and from backing store.  Also found
a long-standing problem where multiple windows fail to refresh
properly in OpenGL and Cairo interfaces due to a lack of calling
GrLock() and GrUnlock() around the call to fetch backing store
after an expose event.  The use of the general purpose frame
buffer allows magic to avoid calling any indirect rendering methods
and should now (finally) allow magic to run in OpenGL mode over a
VNC.  Use of direct rendering methods only also means that magic
does not need to be compiled with the ad hoc switch to have Cairo
handle drawing into pixmaps for the icons (this remains to be
tested).
2017-10-04 14:53:01 -04:00
Tim Edwards 231a299b16 Initial commit at Tue Apr 25 08:41:48 EDT 2017 by tim on stravinsky 2017-04-25 08:41:48 -04:00