Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fernwood!lia!jgro From: jgro@lia (Jeremy Grodberg) Newsgroups: comp.lang.c++ Subject: Re: What do I do with unused arguments? Message-ID: <1990Dec13.002149.6773@lia> Date: 13 Dec 90 00:21:49 GMT References: <133@bwilab3.UUCP> Reply-To: jgro@lia.com (Jeremy Grodberg) Lines: 22 In article <133@bwilab3.UUCP> brad@bwilab3.UUCP (Bradley Ward) writes: >When I write a callback routine such as those used by X windows, >many times I don't need to use the "client_data" argument. But >the C++ compiler issues a "unused argument" warning. > >Any ideas on how to handle this... elegantly ? Leave the names of the unused varaibles out of the declaration of the callback routine. In other words, if the callback is int callback(int x, int y, int z) and you don't use y, then just declare it as int callback(int x, int, int z) and then you won't get any warnings about the unused y. -- Jeremy Grodberg "I don't feel witty today. Don't bug me." jgro@lia.com