Skip to content
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

fix: invalid function pointer conversion compile error #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mo-vic
Copy link

@mo-vic mo-vic commented Oct 6, 2024

Build Environment

OS:
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

GCC Version:
Default gcc-10 (i.e., gcc version 10.5.0 (Ubuntu 10.5.0-4ubuntu2))

Error Message

Mismatch of function pointer cause compile error:

/home/movic/iEDA/src/utility/log/Log.cc: In static member function ‘static void ieda::Log::init(char**, std::string)’:
/home/movic/iEDA/src/utility/log/Log.cc:79:32: error: invalid conversion from ‘void (*)(const char*, int)’ to ‘void (*)(const char*, size_t)’ {aka ‘void (*)(const char*, long unsigned int)’} [-fpermissive]
   79 |   google::InstallFailureWriter(&SignalHandle);
      |                                ^~~~~~~~~~~~~
      |                                |
      |                                void (*)(const char*, int)
In file included from /home/movic/iEDA/src/utility/log/Log.hh:27,
                 from /home/movic/iEDA/src/utility/log/Log.cc:25:
/usr/include/glog/logging.h:1992:12: note:   initializing argument 1 of ‘void google::InstallFailureWriter(void (*)(const char*, size_t))’
 1992 |     void (*writer)(const char* data, size_t size));
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.

Solution

Fixed by replace int with size_t.

@0xharry
Copy link
Contributor

0xharry commented Oct 22, 2024

Thank you for your contribution!

Our team primarily uses Ubuntu 20.04 LTS for development. We need to conduct further testing with this environment to ensure compatibility. Once the tests are successful, we will proceed with merging your pull request.

Thank you for your understanding and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants