summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-07-05 18:19:38 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-07-05 18:19:38 +0300
commit72cca8d7838402eb436f1403d4c29dee46db62a1 (patch)
tree576c877744b892918493a55615cfb7d30074c9da /generator
parent7c5bb6541a820dd4721358226ca3815d94736863 (diff)
Replace #warning with the standard #error.
Diffstat (limited to 'generator')
-rw-r--r--generator/nanopb_generator.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index 1925167f..1923cc1c 100644
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -420,8 +420,8 @@ def generate_header(dependencies, headername, enums, messages):
if largest_count > 64:
yield '\n/* Check that missing required fields will be properly detected */\n'
yield '#if PB_MAX_REQUIRED_FIELDS < %d\n' % largest_count
- yield '#warning Properly detecting missing required fields in %s requires \\\n' % largest_msg.name
- yield ' setting PB_MAX_REQUIRED_FIELDS to %d or more.\n' % largest_count
+ yield '#error Properly detecting missing required fields in %s requires \\\n' % largest_msg.name
+ yield ' setting PB_MAX_REQUIRED_FIELDS to %d or more.\n' % largest_count
yield '#endif\n'
worst = 0
@@ -438,9 +438,6 @@ def generate_header(dependencies, headername, enums, messages):
if worst > 255 or checks:
yield '\n/* Check that field information fits in pb_field_t */\n'
- yield '/* (Largest message has %d fields' % worst
- if checks: yield ' and submessages have to be checked at compile-time.'
- yield ') */\n'
if worst < 65536:
yield '#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)\n'