1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 13:54:12 +01:00

Remove warnings

* Remove assigned but not used variables (GCC 4.6)
* Bump _XOPEN_SOURCE to 600, ridding of FreeBSD warnings (this probably need
  to be tweaked on a per-implementation basis as problems arise)
This commit is contained in:
Tamas TEVESZ
2011-03-24 16:07:20 +01:00
committed by Carlos R. Mafra
parent 43c7abe79f
commit f65b99e615
45 changed files with 83 additions and 174 deletions

View File

@@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <WINGs/WUtil.h>
@@ -216,7 +217,7 @@ void copyFile(char *dir, char *file)
break;
RETRY( nwritten = fwrite(buf, 1, nread, dst) )
if (ferror(dst) || feof(src))
if (ferror(dst) || feof(src) || nread != nwritten)
break;
} while (1);

View File

@@ -48,7 +48,7 @@ void print_help(int print_usage, int exitval)
int main(int argc, char **argv)
{
WMPropList *window_name, *icon_key, *window_attrs, *icon_value;
WMPropList *window_name, *window_attrs, *icon_value;
WMPropList *all_windows, *iconset, *keylist;
int i, ch;
char *path = NULL;
@@ -96,7 +96,6 @@ int main(int argc, char **argv)
}
keylist = WMGetPLDictionaryKeys(iconset);
icon_key = WMCreatePLString("Icon");
for (i = 0; i < WMGetPropListItemCount(keylist); i++) {
window_name = WMGetFromPLArray(keylist, i);

View File

@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <X11/Xlib.h>

View File

@@ -56,7 +56,7 @@ void print_help(int print_usage, int exitval)
int main(int argc, char **argv)
{
char path[PATH_MAX];
WMPropList *dom, *key, *value, *dict;
WMPropList *key, *value, *dict;
int ch;
struct option longopts[] = {
@@ -87,7 +87,6 @@ int main(int argc, char **argv)
if (argc != 3)
print_help(0, 1);
dom = WMCreatePLString(argv[0]);
key = WMCreatePLString(argv[1]);
value = WMCreatePropListFromDescription(argv[2]);
if (!value) {

View File

@@ -397,7 +397,6 @@ static BufferData *newWindow(int magfactor)
int main(int argc, char **argv)
{
BufferData *data;
int i;
char *display = "";
char *vdisplay = NULL;
@@ -481,8 +480,6 @@ int main(int argc, char **argv)
cursorColor1 = WMCreateNamedColor(scr, "#ff0000", False);
cursorColor2 = WMCreateNamedColor(scr, "#00ff00", False);
data = newWindow(magfactor);
WMScreenMainLoop(scr);
return 0;

View File

@@ -4,6 +4,7 @@
#define _GNU_SOURCE /* getopt_long */
#endif
#include <ctype.h>
#include <getopt.h>
#include <limits.h>
#include <locale.h>

View File

@@ -18,12 +18,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#if __GLIBC__ && \
(_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
!_XOPEN_SOURCE
#define _XOPEN_SOURCE 500 /* nftw */
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -20,12 +20,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#if __GLIBC__ && \
(_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
!_XOPEN_SOURCE
#define _XOPEN_SOURCE 500 /* nftw */
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -36,12 +36,6 @@
* Basic validation of the .desktop file is done.
*/
#if __GLIBC__ && \
(_XOPEN_SOURCE && _XOPEN_SOURCE < 500) || \
!_XOPEN_SOURCE
#define _XOPEN_SOURCE 500 /* nftw */
#endif
#include <sys/types.h>
#include <sys/stat.h>

View File

@@ -31,6 +31,7 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <string.h>
#include <strings.h>
#include <pwd.h>
#include <signal.h>
#include <sys/types.h>