diff -Nru bombardier-0.8.2.2/debian/changelog bombardier-0.8.2.2ubuntu1/debian/changelog --- bombardier-0.8.2.2/debian/changelog 2006-07-12 20:36:56.000000000 +0100 +++ bombardier-0.8.2.2ubuntu1/debian/changelog 2009-10-10 13:23:01.000000000 +0100 @@ -1,3 +1,9 @@ +bombardier (0.8.2.2ubuntu1) karmic; urgency=low + + * Fixed warn_unused_result an __open_missing_mode errors (LP: #447967) + + -- Joao Pinto Sat, 10 Oct 2009 12:47:23 +0100 + bombardier (0.8.2.2) unstable; urgency=low * Non-maintainer upload. diff -Nru bombardier-0.8.2.2/display.c bombardier-0.8.2.2ubuntu1/display.c --- bombardier-0.8.2.2/display.c 2001-08-23 12:14:18.000000000 +0100 +++ bombardier-0.8.2.2ubuntu1/display.c 2009-10-10 13:00:25.000000000 +0100 @@ -207,7 +207,12 @@ break; default: free(ret); - asprintf(&ret,"Unnamed %d", citynum); + if(asprintf(&ret,"Unnamed %d", citynum)==-1) + { + printf("asprintf memory allocation error"); + exit(1); + } + } return ret; } @@ -256,7 +261,12 @@ mvaddch(gy(state->line), gx(state->x), '/'); break; } - asprintf(&statusstr, "Blocks: %.4d/%.4d, City: %15s (%.2d), Score: %7d", state->blocks, state->numofblocks, citycompute(state->city), state->city, state->score); + if(asprintf(&statusstr, "Blocks: %.4d/%.4d, City: %15s (%.2d), Score: %7d", state->blocks, state->numofblocks, citycompute(state->city), state->city, state->score)==-1) + { + printf("asprintf memory allocation error"); + exit(1); + } + mvprintw(gy(HEIGHT-1), gx(WIDTH/2-strlen(statusstr)/2), statusstr); free(statusstr); refresh(); diff -Nru bombardier-0.8.2.2/hof.c bombardier-0.8.2.2ubuntu1/hof.c --- bombardier-0.8.2.2/hof.c 2002-04-14 16:31:20.000000000 +0100 +++ bombardier-0.8.2.2ubuntu1/hof.c 2009-10-10 13:07:41.000000000 +0100 @@ -36,15 +36,16 @@ void defhof(int fd) { - write(fd, "Teller Ede |1908-01-15| 16384\n", 40); - write(fd, "Szilárd Leó |1898-02-11| 8192\n", 40); - write(fd, "Neumann János |1903-12-28| 4096\n", 40); - write(fd, "Gábor Dénes |1900-06-05| 2048\n", 40); - write(fd, "Bolyai János |1802-12-15| 1024\n", 40); - write(fd, "Eötvös Loránd |1848-07-27| 512\n", 40); - write(fd, "Horthy Miklós |1800-00-00| 256\n", 40); - write(fd, "Kádár János |1800-00-00| 128\n", 40); - write(fd, "Rákosi Mátyás |1892-00-00| 64\n", 40); + int rc; + rc = write(fd, "Teller Ede |1908-01-15| 16384\n", 40); + rc = write(fd, "Szilárd Leó |1898-02-11| 8192\n", 40); + rc = write(fd, "Neumann János |1903-12-28| 4096\n", 40); + rc = write(fd, "Gábor Dénes |1900-06-05| 2048\n", 40); + rc = write(fd, "Bolyai János |1802-12-15| 1024\n", 40); + rc = write(fd, "Eötvös Loránd |1848-07-27| 512\n", 40); + rc = write(fd, "Horthy Miklós |1800-00-00| 256\n", 40); + rc = write(fd, "Kádár János |1800-00-00| 128\n", 40); + rc = write(fd, "Rákosi Mátyás |1892-00-00| 64\n", 40); } void hof(struct struc_state *state) @@ -61,7 +62,7 @@ fd=open("/var/games/bombardier/bdscore", O_RDWR); if (fd<0) { - fd=open("/var/games/bombardier/bdscore", O_RDWR | O_CREAT); + fd=open("/var/games/bombardier/bdscore", O_RDWR | O_CREAT, S_IRUSR|S_IWUSR); fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); if (fd>0) { @@ -126,10 +127,11 @@ for (i=0;itext=NULL; } if (state->houses_text[state->bombx]!=-1) - asprintf(&(state->text),texts[state->houses_text[state->bombx]].text); + { + if(asprintf(&(state->text), "%s", texts[state->houses_text[state->bombx]].text)==-1) + { + printf("asprintf memory allocation error"); + exit(1); + } + } state->houses[state->bombx]--; state->blocks--; state->willbebombed--;