-
Notifications
You must be signed in to change notification settings - Fork 14
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
small build fixes #98
Open
hramrach
wants to merge
21
commits into
arakiken:master
Choose a base branch
from
hramrach:misc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hramrach
force-pushed
the
misc
branch
2 times, most recently
from
May 17, 2024 21:39
8ca9d56
to
ff11006
Compare
libtool: link: gcc main.o mc_combo.o mc_char_encoding.o mc_im.o mc_tabsize.o mc_logsize.o mc_font.o mc_color.o mc_radio.o mc_space.o mc_alpha.o mc_ctl.o mc_sb_view.o mc_wall_pic.o mc_bgtype.o mc_io.o mc_io_pty.o mc_io_file.o mc_pty.o mc_char_width.o mc_flags.o mc_auto_detect.o mc_ratio.o mc_wordsep.o mc_unicode_areas.o mc_geometry.o mc_click.o mc_opentype.o -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I../../baselib/include -DUSE_WAYLAND -DOPENSSL_LOAD_CONF -DUSE_LIBSSH2 -DHAVE_PTHREAD -g -O2 -I../../xwindow -I../../vtemu -I../../common -I../../common -I../../inputmethod -I/usr/local/include -DSYSCONFDIR=\"/usr/local/etc\" -DLOCALEDIR=\"/usr/local/share/locale\" -DXDATADIR=\"/usr/local/share\" -DLIBDIR=\"/usr/local/lib64\" -o .libs/mlconfig -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype ../../baselib/src/.libs/libpobl.so -ldl -pthread /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: mc_font.o: undefined reference to symbol 'XListFonts' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[1]: *** [Makefile:70: mlconfig] Error 1
zmodem uses dirname but does not include the header that declares it. This is an error with gcc14. Same header is used for base name and dirname, use HAVE_BASENAME for detection of the header.
missing prototype causes an error with gcc14
In a few places empty string is passed as ef_char_t*. Pass in a pointer to zero ef_char_t instead.
This refcount code is incrementing/decrementing a pointer casting it to int. Cast to void * instead to avoid error in gcc14.
There are users ob basename that pass in a const string. This is an error with gcc14. It's possible to make a copy of the string before passing it to basename but there is also another way: avoid modifiyng the string in basename. basename can return pointer to the start of the base part without changing the string. However, it cannot strip trailing slashes.
The write function does not modify the passed-in string. Some users pass in a const string which is an error with gcc14. Declare the written data parameter as const.
The code calls a function that takes FriBidiParType pointer but passes in FriBidiCharType. It looks liek this is equivalent because the initial values of both enumerations are the same but the type mismatch causes an error in gcc14
In a few places where the GTK function returns a base type the cast to subtype is missing causing an error with gcc14
mlterm uses a trick that the C standrds committee hates: it allocates a structure and its members as one memory block so it can be freed as one block without complex recursive freeing of members. To vaoid an error with gcc14 instead of assigning pointer to the structure increased by one to its member assign the malloc result into a temporary void pointer, and use void pointer arithmetic to get the allocated member address. Another variant is allocating a memory block and assigning it to multiple incompatible pointes at once.
These local variables are used to store a pointer of different type causing type mismatch error in gcc14.
There are a couple local functions that declare argument type not compatible with what is passed in, adjust them.
Strings are a wild mix of char *, u_char *, XChar2b * and others depending on where they came from. Add cast where gcc14 reports error.
XEvent is an union with different fields depending on the event type. C language committe hates wire protocols, and in gcc14 they are endless source of errors. Add some type casts. Also for struct sockaddr.
There are a few places where type-mismatched pointers to display structures or its members are used. In a few places the type can be adjusted, add casts elsewhere.
In a few places pointers to data buffers of different type are used, and gcc14 reports this as an error. Add casts.
The 'user' variable is passed to bl_parse_uri which modifies the content as well as assigned const return from bl_get_user_name. Use a temporary variable to avoid the warning.
The preedit text is passed to utf-8 parser which technically does not modify it but it shares interface with the vt parser which may modify the text due to combining characters. Drop the const to avoid warning.
The recv_dir is assigned to dst_path in one leg of the function, and in another leg dst_path is passed to custom mkdir implementation which modifies the string. With that it cannot be const.
The font name received from gtk_entry_get_text is a const string. As far as gcc can tell the combo functions do not modify the string, they can accept a const string as well. Declare it as const to avoid warning.
hramrach
force-pushed
the
misc
branch
2 times, most recently
from
May 20, 2024 09:27
e00e4e9
to
85b9eb9
Compare
Should mostly resolve #92 |
Thank you. |
Thanks for looking into this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A number of small build fixes