• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxobjective-cc#cocoa誰得qtrubybathyscaphegamephpguiwindows翻訳cpythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

patch投げ用


Commit MetaInfo

Revision5da1ef68b53134394256453980b5e99b092d191b (tree)
Zeit2016-06-11 04:23:45
AutorSHIRAKATA Kentaro <argrath@ub32...>
CommiterSHIRAKATA Kentaro

Log Message

suppress GCC warnings

Ändern Zusammenfassung

Diff

--- a/japanese/jlib.c
+++ b/japanese/jlib.c
@@ -1303,6 +1303,8 @@ static int
13031303 kanji2index(c1, c2)
13041304 unsigned char c1, c2;
13051305 {
1306+#pragma GCC diagnostic push
1307+#pragma GCC diagnostic ignored "-Wmultichar"
13061308 #if (('=')==0x8181)
13071309 /* SJIS */
13081310 if (c1 >= 0xe0) c1 -= 0x40;
@@ -1315,6 +1317,7 @@ unsigned char c1, c2;
13151317 return (((int)c1 & 0x7f) - 0x21) * (0x7e - 0x21 + 1) +
13161318 (((int)c2 & 0x7f) - 0x21);
13171319 #endif
1320+#pragma GCC diagnostic pop
13181321 }
13191322
13201323 int
--- a/src/files.c
+++ b/src/files.c
@@ -930,7 +930,10 @@ void
930930 save_savefile_name(fd)
931931 int fd;
932932 {
933+#pragma GCC diagnostic push
934+#pragma GCC diagnostic ignored "-Wunused-result"
933935 (void) write(fd, (genericptr_t) SAVEF, sizeof(SAVEF));
936+#pragma GCC diagnostic pop
934937 }
935938 #endif
936939
@@ -1320,8 +1323,11 @@ boolean uncomp;
13201323 redirect(filename, RDBMODE, stdin, uncomp);
13211324 redirect(cfn, WRBMODE, stdout, uncomp);
13221325 }
1326+#pragma GCC diagnostic push
1327+#pragma GCC diagnostic ignored "-Wunused-result"
13231328 (void) setgid(getgid());
13241329 (void) setuid(getuid());
1330+#pragma GCC diagnostic pop
13251331 (void) execv(args[0], (char *const *) args);
13261332 perror((char *) 0);
13271333 (void) fprintf(stderr, "Exec to %scompress %s failed.\n",
--- a/src/restore.c
+++ b/src/restore.c
@@ -1197,8 +1197,11 @@ int fd;
11971197 char *plbuf;
11981198 {
11991199 int pltmpsiz = 0;
1200+#pragma GCC diagnostic push
1201+#pragma GCC diagnostic ignored "-Wunused-result"
12001202 (void) read(fd, (genericptr_t) &pltmpsiz, sizeof(pltmpsiz));
12011203 (void) read(fd, (genericptr_t) plbuf, pltmpsiz);
1204+#pragma GCC diagnostic pop
12021205 return;
12031206 }
12041207
--- a/src/save.c
+++ b/src/save.c
@@ -411,7 +411,10 @@ savestateinlock()
411411 if (tricked_fileremoved(fd, whynot))
412412 return;
413413
414+#pragma GCC diagnostic push
415+#pragma GCC diagnostic ignored "-Wunused-result"
414416 (void) read(fd, (genericptr_t) &hpid, sizeof(hpid));
417+#pragma GCC diagnostic pop
415418 if (hackpid != hpid) {
416419 Sprintf(whynot, "Level #0 pid (%d) doesn't match ours (%d)!",
417420 hpid, hackpid);
@@ -428,11 +431,17 @@ savestateinlock()
428431 done(TRICKED);
429432 return;
430433 }
434+#pragma GCC diagnostic push
435+#pragma GCC diagnostic ignored "-Wunused-result"
431436 (void) write(fd, (genericptr_t) &hackpid, sizeof(hackpid));
437+#pragma GCC diagnostic pop
432438 if (flags.ins_chkpt) {
433439 int currlev = ledger_no(&u.uz);
434440
441+#pragma GCC diagnostic push
442+#pragma GCC diagnostic ignored "-Wunused-result"
435443 (void) write(fd, (genericptr_t) &currlev, sizeof(currlev));
444+#pragma GCC diagnostic pop
436445 save_savefile_name(fd);
437446 store_version(fd);
438447 store_savefileinfo(fd);
--- a/sys/share/unixtty.c
+++ b/sys/share/unixtty.c
@@ -409,7 +409,10 @@ linux_mapon()
409409 {
410410 #ifdef TTY_GRAPHICS
411411 if (!strcmp(windowprocs.name, "tty") && linux_flag_console) {
412+#pragma GCC diagnostic push
413+#pragma GCC diagnostic ignored "-Wunused-result"
412414 write(1, "\033(B", 3);
415+#pragma GCC diagnostic pop
413416 }
414417 #endif
415418 }
@@ -419,7 +422,10 @@ linux_mapoff()
419422 {
420423 #ifdef TTY_GRAPHICS
421424 if (!strcmp(windowprocs.name, "tty") && linux_flag_console) {
425+#pragma GCC diagnostic push
426+#pragma GCC diagnostic ignored "-Wunused-result"
422427 write(1, "\033(U", 3);
428+#pragma GCC diagnostic pop
423429 }
424430 #endif
425431 }
--- a/sys/unix/unixmain.c
+++ b/sys/unix/unixmain.c
@@ -474,8 +474,11 @@ boolean wr;
474474 #endif
475475 ) {
476476 #ifdef SECURE
477+#pragma GCC diagnostic push
478+#pragma GCC diagnostic ignored "-Wunused-result"
477479 (void) setgid(getgid());
478480 (void) setuid(getuid()); /* Ron Wessels */
481+#pragma GCC diagnostic pop
479482 #endif
480483 } else {
481484 /* non-default data files is a sign that scores may not be
--- a/sys/unix/unixunix.c
+++ b/sys/unix/unixunix.c
@@ -303,11 +303,14 @@ int wt;
303303 linux_mapon();
304304 #endif
305305 if ((f = fork()) == 0) { /* child */
306+#pragma GCC diagnostic push
307+#pragma GCC diagnostic ignored "-Wunused-result"
306308 (void) setgid(getgid());
307309 (void) setuid(getuid());
308310 #ifdef CHDIR
309311 (void) chdir(getenv("HOME"));
310312 #endif
313+#pragma GCC diagnostic pop
311314 return (1);
312315 }
313316 if (f == -1) { /* cannot fork */
--- a/util/recover.c
+++ b/util/recover.c
@@ -116,8 +116,11 @@ char *argv[];
116116 && strcmp(dir, HACKDIR)
117117 #endif
118118 ) {
119+#pragma GCC diagnostic push
120+#pragma GCC diagnostic ignored "-Wunused-result"
119121 (void) setgid(getgid());
120122 (void) setuid(getuid());
123+#pragma GCC diagnostic pop
121124 }
122125 #endif /* SECURE && !VMS */
123126
@@ -352,7 +355,10 @@ char *basename;
352355 if (lfd >= 0) {
353356 /* any or all of these may not exist */
354357 levc = (xchar) lev;
358+#pragma GCC diagnostic push
359+#pragma GCC diagnostic ignored "-Wunused-result"
355360 write(sfd, (genericptr_t) &levc, sizeof(levc));
361+#pragma GCC diagnostic pop
356362 copy_bytes(lfd, sfd);
357363 Close(lfd);
358364 (void) unlink(lock);