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

[3.2] disable unused-function warning in secp256k1 #253

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Sep 28, 2022

Resolve #19

secp256k1 produced over 190 warnings in the form of

/home/lh/work/leap-main/libraries/libfc/secp256k1/secp256k1/src/field.h:44:13: warning: ‘secp256k1_fe_normalize’   declared ‘static’ but never defined [-Wunused-function]
   44 | static void secp256k1_fe_normalize(secp256k1_fe *r);
      |             ^~~~~~~~~~~~~~~~~~~~~~
/home/lh/work/leap-main/libraries/libfc/secp256k1/secp256k1/src/field.h:47:13: warning:                            ‘secp256k1_fe_normalize_weak’ declared ‘static’ but never defined [-Wunused-function]
   47 | static void secp256k1_fe_normalize_weak(secp256k1_fe *r);
.../home/lh/work/leap-main/libraries/libfc/secp256k1/secp256k1/src/field.h:44:13: warning: ‘secp256k1_fe_normalize’   declared ‘static’ but never defined [-Wunused-function]
   44 | static void secp256k1_fe_normalize(secp256k1_fe *r);
      |             ^~~~~~~~~~~~~~~~~~~~~~
/home/lh/work/leap-main/libraries/libfc/secp256k1/secp256k1/src/field.h:47:13: warning:                            ‘secp256k1_fe_normalize_weak’ declared ‘static’ but never defined [-Wunused-function]
   47 | static void secp256k1_fe_normalize_weak(secp256k1_fe *r);
...

As we consider secp256k1 as a system library and use it without any modifications, it is OK to disable the warning to avoid cluttering compile log.

Before the fix, Leap build log was 1,710 lines long; after the fix, it is 1,096 lines. Only 22 warnings remain. We can hopefully have a clean build in release/3.2.

Copy link
Member

@spoonincode spoonincode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@linh2931 linh2931 merged commit 2001477 into main Sep 28, 2022
@linh2931 linh2931 deleted the fix_secp256k1_warnings branch September 28, 2022 19:36
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.

192 compile warnings in fc/secp256k1
2 participants