-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a warning when there are only enums, no messages. (#370)
Previously we got: ``` ...../build/enum_test/autogen/Proto/EnumOnly.hs:72:1: error: [-Wunused-top-binds, -Werror=unused-top-binds] Defined but not used: ‘packedFileDescriptor’ | 72 | packedFileDescriptor | ^^^^^^^^^^^^^^^^^^^^ ``` The check for whether the file had any messages was incorrect, since it didn't account for enums which are tracked in the same map.
- Loading branch information
Showing
4 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// A file that only contains an enum, not a message. | ||
// Checks that we're not generating unused top-level definitions. | ||
|
||
syntax = "proto2"; | ||
|
||
package enums; | ||
|
||
enum Lone { | ||
LONE = 0; | ||
} |
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