Skip to content

Commit

Permalink
Re-enable -Waddress - gncInvoiceLookup etc. are now inline functions,…
Browse files Browse the repository at this point in the history
… not macros

- Remove outdated comments
  • Loading branch information
richardcohen committed Jan 24, 2023
1 parent a81b72f commit d6ac56c
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 49 deletions.
13 changes: 0 additions & 13 deletions bindings/business-core.i
Expand Up @@ -18,19 +18,6 @@
* *
\********************************************************************/

#if defined(SWIGGUILE)
%{
/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
* passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
* gncInvoiceLookup and friends. When the macro gets inlined, the compiler
* emits a warning that the guid null pointer test is always true.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Waddress"
#endif
%}
#endif

%rename(gncOwnerReturnGUID) gncOwnerRetGUID;

%inline %{
Expand Down
9 changes: 0 additions & 9 deletions gnucash/gnome/business-urls.c
Expand Up @@ -45,15 +45,6 @@
#include "dialog-invoice.h"
#include "dialog-job.h"

/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
* passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
* gncInvoiceLookup and friends. When the macro gets inlined, the compiler
* emits a warning that the guid null pointer test is always true.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Waddress"
#endif

#define HANDLE_TYPE(URL_TYPE_STR,OBJ_TYPE) { \
QofBook *book; \
GncGUID guid; \
Expand Down
9 changes: 0 additions & 9 deletions gnucash/gnome/dialog-invoice.c
Expand Up @@ -80,15 +80,6 @@
#include "dialog-transfer.h"
#include "gnc-uri-utils.h"

/* Disable -Waddress. GCC 4.2 warns (and fails to compile with -Werror) when
* passing the address of a guid on the stack to QOF_BOOK_LOOKUP_ENTITY via
* gncInvoiceLookup and friends. When the macro gets inlined, the compiler
* emits a warning that the guid null pointer test is always true.
*/
#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
# pragma GCC diagnostic warning "-Waddress"
#endif

#define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
#define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"

Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncBillTerm.h
Expand Up @@ -115,8 +115,6 @@ void gncBillTermSetCutoff (GncBillTerm *term, gint cutoff);
/** Return a pointer to the instance gncBillTerm that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncBillTerm * gncBillTermLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncBillTerm * gncBillTermLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncCustomer.h
Expand Up @@ -112,8 +112,6 @@ void gncCustomerRemoveJob (GncCustomer *customer, GncJob *job);
/** Return a pointer to the instance gncCustomer that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncCustomer * gncCustomerLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncCustomer * gncCustomerLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncEmployee.h
Expand Up @@ -108,8 +108,6 @@ Account * gncEmployeeGetCCard (const GncEmployee *employee);
/** Return a pointer to the instance gncEmployee that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncEmployee * gncEmployeeLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncEmployee * gncEmployeeLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncEntry.h
Expand Up @@ -290,8 +290,6 @@ GncInvoice * gncEntryGetBill (const GncEntry *entry);
/** Return a pointer to the instance gncEntry that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncEntry * gncEntryLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncEntry * gncEntryLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncInvoice.h
Expand Up @@ -268,8 +268,6 @@ GncInvoice * gncInvoiceGetInvoiceFromLot (GNCLot *lot);
/** Return a pointer to the instance gncInvoice that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncInvoice * gncInvoiceLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncInvoice * gncInvoiceLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncJob.h
Expand Up @@ -89,8 +89,6 @@ gboolean gncJobGetActive (const GncJob *job);
/** Return a pointer to the instance gncJob that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncJob * gncJobLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncJob * gncJobLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncOrder.h
Expand Up @@ -98,8 +98,6 @@ gboolean gncOrderIsClosed (const GncOrder *order);
/** Return a pointer to the instance gncOrder that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncOrder * gncOrderLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncOrder * gncOrderLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncTaxTable.h
Expand Up @@ -142,8 +142,6 @@ gboolean gncTaxTableEqual(const GncTaxTable *a, const GncTaxTable *b);
/** Return a pointer to the instance gncTaxTable that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncTaxTable * gncTaxTableLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncTaxTable *gncTaxTableLookup (const QofBook* book, const GncGUID *guid)
{
Expand Down
2 changes: 0 additions & 2 deletions libgnucash/engine/gncVendor.h
Expand Up @@ -108,8 +108,6 @@ int gncVendorCompare (const GncVendor *a, const GncVendor *b);
/** Return a pointer to the instance gncVendor that is identified
* by the guid, and is residing in the book. Returns NULL if the
* instance can't be found.
* Equivalent function prototype is
* GncVendor * gncVendorLookup (QofBook *book, const GncGUID *guid);
*/
static inline GncVendor * gncVendorLookup (const QofBook *book, const GncGUID *guid)
{
Expand Down

0 comments on commit d6ac56c

Please sign in to comment.