Bug 143103

Summary: Taglib C API "taglib_tag_free_strings()" has a bogus prototype
Product: [Frameworks and Libraries] taglib Reporter: Benjamin Pineau <ben.pineau>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Benjamin Pineau 2007-03-17 12:17:53 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) 
OS:                Linux

taglib/tag_c.h contains this erroneous prototype :
  void taglib_tag_free_strings();
This is not the proper way to declare a function that has no
parameters (see ISO/IEC 9899:TC2 section 6.5.7.3).

This problem prevents consumers applications to compile with 
gcc's strict prototypes checks :

ben$ cat test.c
#include <stdio.h>
#include <tag_c.h> /* taglib */
int main(void) { return 0; }

ben$ gcc -Wstrict-prototypes `taglib-config --cflags` test.c -o test
In file included from test.c:2:
/usr/include/taglib/tag_c.h:220: warning: 
  function declaration isn’t a prototype

So here is a trivial patch that shouldn't break binary compat :

Index: bindings/c/tag_c.h
===================================================================
--- bindings/c/tag_c.h  (revision 643408)
+++ bindings/c/tag_c.h  (working copy)
@@ -218,7 +218,7 @@
 /*!
  * Frees all of the strings that have been created by the tag.
  */
-void taglib_tag_free_strings();
+void taglib_tag_free_strings(void);
 
 /******************************************************************************
  * Audio Properties API
Comment 1 Scott Wheeler 2007-03-22 18:30:37 UTC
SVN commit 645468 by wheeler:

Fix signature.

BUG:143103


 M  +1 -1      tag_c.h  


--- trunk/kdesupport/taglib/bindings/c/tag_c.h #645467:645468
@@ -218,7 +218,7 @@
 /*!
  * Frees all of the strings that have been created by the tag.
  */
-void taglib_tag_free_strings();
+void taglib_tag_free_strings(void);
 
 /******************************************************************************
  * Audio Properties API