Skip to content

Commit 7ecdbc9

Browse files
committed
Remove obsolete warnings
1 parent 6df4a29 commit 7ecdbc9

File tree

7 files changed

+12
-73
lines changed

7 files changed

+12
-73
lines changed

RELEASENOTES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,11 @@
175175
- `release 6 6316`
176176
- `release 7 7027`
177177
- `release 6 6138`
178+
- `note 6` Removed the obsolete warning type `WSYSTEMC`. This warning was never
179+
reported. This change will cause errors if existing makefiles pass
180+
`--nowarn=WSYSTEMC`.
181+
- `note 6` Removed the obsolete warning types `WSHALL`, `WNDOC`, `WNSHORTDESC`,
182+
and `WDUPEVENT`. These are all disabled by default and have no known uses,
183+
typically because enabling them produced a overwhelming noise from false
184+
positives. This change will cause errors if exiting makefiles pass e.g.
185+
`--warn=WSHALL`.

messages_to_md.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def print_messages(f, warnings, errors):
6060
## Warning Messages
6161
6262
The messages are listed in alphabetical order; the corresponding tags
63-
are shown within brackets, e.g., `[WNDOC]`.
63+
are shown within brackets, e.g., `[WNDOCRA]`.
6464
6565
""")
6666

py/dml/c_backend.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ def check_attribute(node, port, prefix):
512512
if (node.objtype in {'attribute', 'connect'}
513513
and config_param == 'required'):
514514
report(WNDOCRA(node, node.logname()))
515-
elif node.objtype != 'register':
516-
report(WNDOC(node, node.logname()))
517515
attrname = get_attr_name(prefix, node)
518516
register_attribute(node.site, port, attrname)
519517
if port and need_port_proxy_attrs(port):
@@ -543,7 +541,6 @@ def generate_attribute_common(initcode, node, port, dimsizes, prefix,
543541
report(WNDOCRA(node, node.logname()))
544542
doc = "Undocumented"
545543
else:
546-
report(WNDOC(node, node.logname()))
547544
doc = "Undocumented"
548545

549546
# append the required interfaces to the docstring
@@ -1954,8 +1951,6 @@ def generate_init(device, initcode, outprefix):
19541951
out('.description = '+doc.read()+',\n')
19551952
if sdoc:
19561953
out('.short_desc = '+sdoc.read()+',\n')
1957-
else:
1958-
report(WNSHORTDESC(device.site))
19591954
out('};\n', preindent = -1)
19601955
out('\n')
19611956
out('conf_class_t *class = SIM_create_class("'

py/dml/ctree.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,9 +2033,7 @@ def make_simple(site, lh, rh):
20332033
etype = realtype(expr.ctype())
20342034
assert etype.is_int
20352035
ltype = realtype(lh.ctype())
2036-
if etype.bits < 1:
2037-
report(WSHALL(site, lh, rh))
2038-
elif ltype.bits > 32 and etype.bits <= 32:
2036+
if ltype.bits > 32 and etype.bits <= 32:
20392037
expr = mkCast(site, expr, etype)
20402038
return expr
20412039

py/dml/dmlc.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ def prerr(msg):
3535
output_c = True
3636

3737

38-
# Ignore some warnings by default
39-
ignore_warning('WASSERT')
40-
ignore_warning('WNDOC')
41-
ignore_warning('WSHALL')
42-
ignore_warning('WUNUSED')
43-
ignore_warning('WNSHORTDESC')
44-
4538
if os.getenv('DMLC_DEBUG'):
4639
debug_mode = True
4740
else:

py/dml/messages.py

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,32 +1896,7 @@ class WNOVER(DMLWarning):
18961896
"""
18971897
fmt = "file has no version tag, assuming version 1.2"
18981898

1899-
class WSHALL(DMLWarning):
19001899
"""
1901-
The result of the shift operation will always be zero.
1902-
(This warning is disabled by default.)
1903-
"""
1904-
fmt = "shifting away all data\n%s"
1905-
def __init__(self, node, lh, rh):
1906-
DMLWarning.__init__(self, node, binary_dump(lh, rh))
1907-
1908-
class WNDOC(DMLWarning):
1909-
"""
1910-
No documentation string was specified for the attribute.
1911-
(This warning is disabled by default.)
1912-
"""
1913-
fmt = "no documentation for '%s'"
1914-
def __init__(self, node, member):
1915-
DMLWarning.__init__(self, node, member)
1916-
1917-
class WNSHORTDESC(DMLWarning):
1918-
"""
1919-
No short description string was specified using the 'desc' parameter.
1920-
(This warning is disabled by default.)
1921-
"""
1922-
fmt = "no 'desc' parameter specified for device"
1923-
def __init__(self, node):
1924-
DMLWarning.__init__(self, node)
19251900
19261901
class WNDOCRA(DMLWarning):
19271902
"""
@@ -1939,16 +1914,6 @@ class WNEGOFFS(DMLWarning):
19391914
"""
19401915
fmt = "negative register offset: %d"
19411916
1942-
class WUNUSED(DMLWarning):
1943-
"""
1944-
The object is not referenced anywhere.
1945-
(This warning is disabled by default.; it typically causes many false
1946-
warnings.)
1947-
"""
1948-
fmt = "unused: %s"
1949-
def __init__(self, obj):
1950-
DMLWarning.__init__(self, obj, obj.identity())
1951-
19521917
class WUNUSEDDEFAULT(DMLWarning):
19531918
"""
19541919
The object is not referenced anywhere but it matches a name of an
@@ -1980,16 +1945,6 @@ class WUNUSED_DML12(DMLWarning):
19801945
def __init__(self, obj):
19811946
DMLWarning.__init__(self, obj, obj.name)
19821947
1983-
class WDUPEVENT(DMLWarning):
1984-
"""
1985-
Two or more events will be checkpointed using the same name, which
1986-
means that the checkpoint cannot be safely read back.
1987-
"""
1988-
fmt = "duplicate event checkpoint names: %s"
1989-
def __init__(self, site, objlist):
1990-
DMLWarning.__init__(self, site,
1991-
", ".join(dollar(self.site) + o.logname()
1992-
for o in objlist))
19931948
19941949
class WSIZEOFTYPE(DMLWarning):
19951950
"""
@@ -2028,11 +1983,6 @@ class WCONFIDENTIAL(DMLWarning):
20281983
def __init__(self, site):
20291984
DMLWarning.__init__(self, site)
20301985
2031-
# Not used (see ctree.py class CopyData), not documented.
2032-
# class WASSIGN(DMLWarning):
2033-
# def __init__(self, site):
2034-
# DMLWarning.__init__(self, site, "cannot perform assignment")
2035-
20361986
class WOLDAST(DMLWarning):
20371987
"""
20381988
A precompiled DML file has an old time-stamp. This may happen if a
@@ -2052,11 +2002,8 @@ class WWRNSTMT(DMLWarning):
20522002
"""
20532003
fmt = "%s"
20542004
2055-
class WSYSTEMC(DMLWarning):
2056-
""" SystemC specific warnings """
2057-
fmt = "%s"
20582005
2059-
# This message should be removed, SIMICS-9886
2006+
# This message should be removed, SIMICS-9886
20602007
class WREF(DMLWarning):
20612008
"""An unused parameter refers to an object that has not been declared.
20622009

py/dml/structure.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,7 @@ def check_unused_and_warn(node):
463463
not used. This usually applies to methods and parameters."""
464464

465465
if node.refcount == 0:
466-
if not warning_is_ignored('WUNUSED'):
467-
report(WUNUSED(node))
468-
elif is_unused_default(node):
466+
if is_unused_default(node):
469467
report(WUNUSEDDEFAULT(node))
470468
elif dml.globals.dml_version != (1, 2) and is_dml12_method(node):
471469
report(WUNUSED_DML12(node))

0 commit comments

Comments
 (0)