bits: changes required in order to build on a newer gcc compiler 9.4#13
Open
ani-sinha wants to merge 3 commits intobiosbits:masterfrom
Open
bits: changes required in order to build on a newer gcc compiler 9.4#13ani-sinha wants to merge 3 commits intobiosbits:masterfrom
ani-sinha wants to merge 3 commits intobiosbits:masterfrom
Conversation
Indentation for an if condition was incorrect. Hence upon hitting the error conditional, the code was not returning the error the value. Fixed in this change by adding braces with the if conditional. This error was found when compiling with a newer version of gcc 9.4.0 on ubuntu 20.04.2. Signed-off-by: Ani Sinha <ani@anisinha.ca>
In many cases, the callback function pointers in PyMethodDef definitions are
cast to PyCFunction type where as their actual signature matches that of
PyCFunctionWithKeywords type. This issue exists throughout in python 2.7
codebase in general. On newer compilers, this produces a compile time failure
like the following:
build/grub/grub-core/contrib/python/bitsmodule.c:558:16: error: cast between incompatible function types from 'PyObject * (*)(PyObject *, PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *, struct _object *)'} to 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} [-Werror=cast-function-type]
558 | {"get_xy", (PyCFunction)bits_get_xy, METH_KEYWORDS, "get_xy(term) -> (cursor_x, cursor_y)"},
Pass -Wno-cast-function-type in compiler cflags in order to suppress this
failure.
Signed-off-by: Ani Sinha <ani@anisinha.ca>
All the bits specific submodules have been forked and this commit updates the top level bits repo to refer to these forks. Signed-off-by: Ani Sinha <ani@anisinha.ca>
This file contains hidden or 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
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.
These are all the changes needed to build bits on the newer gcc 9.4 compiler.