Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56126 - dynamite-0.1 - error: too few arguments to function `fprintf'
Summary: dynamite-0.1 - error: too few arguments to function `fprintf'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo PDA project
URL: http://linuxshop.ru/forum/viewtopic.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-05 05:20 UTC by azalio
Modified: 2004-07-06 20:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description azalio 2004-07-05 05:20:42 UTC
I try emerge dynamite-0.1. 

Reproducible: Always
Steps to Reproduce:
1.emerge dynamite-0.1
2.
3.

Actual Results:  
gcc -DHAVE_CONFIG_H -I. -I. -I..    -g -ansi -Wno-long-long -Wall -Werror  -I..
/lib -O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe -c `test 
-f 'dynamite.c' || echo './'`dynamite.c 
dynamite.c: In function `main': 
dynamite.c:30: warning: passing arg 1 of `fprintf' from incompatible pointer 
type 
dynamite.c:30: error: too few arguments to function `fprintf' 
make[2]: *** [dynamite.o] Ошибка 1 
make[2]: Leaving directory `/var/tmp/portage/dynamite-0.1/work/dynamite-0.1/src' 
make[1]: *** [all-recursive] Ошибка 1 
make[1]: Leaving directory `/var/tmp/portage/dynamite-0.1/work/dynamite-0.1' 
make: *** [all] Ошибка 2 

!!! ERROR: app-pda/dynamite-0.1 failed. 
!!! Function src_compile, Line 25, Exitcode 2 
!!! (no error message)


bash-2.05b# emerge info
Portage 2.0.50-r8 (2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.6az)
=================================================================
System uname: 2.6.6az i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.
1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config 
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.
org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acpi alsa apm arts avantgo avi berkdb cdr crypt divx4linux dvd 
encode esd flash foomaticdb gdbm gif gpm gtk gtk2 icq imlib java jikes jpeg kde 
libg++ libwww linguas_ru mad mikmod mmx motif mpeg ncurses nls oggvorbis opengl 
oscar oss pam pdflib perl png python qt quicktime readline samba sdl slang speex 
spell ssl svga tcpd tiff truetype unicode usb videos x86 xml2 xmms xv xvid zlib"
Comment 1 Andrew 2004-07-06 12:26:21 UTC
The sigsegv patch seems to cause this so I fixed it (fprintf should have been printf):

diff -Naur dynamite-0.1/src/dynamite.c dynamite-0.1b/src/dynamite.c
--- dynamite-0.1/src/dynamite.c 2003-08-22 01:55:42.000000000 -0700
+++ dynamite-0.1b/src/dynamite.c        2004-07-06 11:49:22.682336952 -0700
@@ -1,6 +1,7 @@
 /* $Id: dynamite.c,v 1.1.1.1 2003/08/22 08:55:42 twogood Exp $ */
 #include "libdynamite.h"
 #include <stdio.h>
+#include <stdlib.h>

 #define FCLOSE(file)    if (file) { fclose(file); file = NULL; }

@@ -25,6 +26,11 @@
   int result = -1;
   Cookie cookie;

+  if (argc < 3) {
+       printf("Missing filename: dynamite <source> <destination>\n");
+       return 1;
+  }
+
   cookie.input_file   = fopen(argv[1], "r");
   cookie.output_file  = fopen(argv[2], "w");

Comment 2 Alastair Tse (RETIRED) gentoo-dev 2004-07-06 20:05:14 UTC
thanks for your report! i'm not even sure how that mistake crept into the bug, its so embarassing :(