On 04/09/12 18:57, Alan Coopersmith wrote:
On 04/ 8/12 05:50 PM, Brock Pytlik wrote:
Hmm, I did run make lint and just double checked it. On build 13, on my machine,
when I run 'make lint', I get no complaints about zoneproxy-adm. Maybe I'm using
the wrong version of lint or something? I'll mention that when I run make lint,
I see a bunch of other lint warnings coming from our cpython modules, so that
might need adjusting too.
If I'm understanding the src/Makefile in the package gate correctly, it's
not calling the lint rule in $(SUBDIRS) like zoneproxy, but should do so
with a simple addition of:

lint: $(SUBDIRS)
The one issue with this is that not all of our subdirs have rules for lint. I'm not sure whether the better approach is to add empty lint rules where needed, or to instead do something like that clobber does for the pkg dir.

Since I'm in this space, the other thing I'd like to do is remove setup.py lint, and instead have lint in the makefile depend on client and pylint. Thoughts?

In any case, going back to the zone proxy problem, since the function in
question is main(), you can make both the compiler and lint happy by simply
removing the exit instead of the return:

--- a/src/zoneproxy/zoneproxy-adm/zoneproxy-adm.c
+++ b/src/zoneproxy/zoneproxy-adm/zoneproxy-adm.c
@@ -105,6 +105,5 @@

        notify_zoneproxyd(zoneid, remove);

-       exit(0);
        return 0;
  }

since a return value from main() is automatically passed to exit().
Yeah, this seems like the better approach. (No one seems sure why both exit and return were there in the first place.)

Brock


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to