
HI,
Many years ago I looked this up and came to the interpretation of the ASN.1 spec that you could not have two imports from the same module. However, even if you come to the opposite interpretation, the message that "identifier `OBJECT-TYPE' imported..." is incorrect, since it was used.
By the way, consider yourself lucky that you are not trying to clean up the MIB modules.
I ran into another issue today that was not reported as an error at low error levels. Sorry, I don't have the MIB in front of me. However, it is easy to reproduce. It was a notification definition where the items in the OBJECTS clause were simply OID definitions, such as
a OBJECT IDENTIIFER ::= { foo 1 }
bar NOTIFICATION-TYPE OBJECTS { a } ....
On Wed, 14 Nov 2007, Juergen Schoenwaelder wrote:
On Tue, Nov 13, 2007 at 02:53:27PM -0800, David T. Perkins wrote:
In cleaning up a MIb module, it had the following imports:
IMPORTS OBJECT-TYPE FROM SNMPv2-SMI OBJECT-TYPE, IpAddress, MODULE-IDENTITY, enterprises FROM SNMPv2-SMI DisplayString, TruthValue FROM SNMPv2-TC;
With a level 5 or greater, smilint generated the warning: warning: identifier `OBJECT-TYPE' imported from module `SNMPv2-SMI' is never used
This is misleading. I was expecting the following two warnings:
- duplicate definition of "OBJECT-TYPE"
- all of the items from a module must be imported together
Have you checked the good old ASN.1 (1987) specs? I am not sure it is actually illegal to do the above. Unfortunately, it will be difficult to find the right specs and then they might be silent about this...
/js
Regards, /david t. perkins