Skip to content

Commit cd39b26

Browse files
committed
fix some compiler warnings
1 parent 7f8eaa7 commit cd39b26

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

src/heap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ heap_getmem( Heap *heap )
778778
* it here as well just in case.
779779
*/
780780
if( heap->free ) {
781-
EXTRACTNODE( heap, hn );
781+
(void) EXTRACTNODE( heap, hn );
782782
return( hn );
783783
}
784784

@@ -830,7 +830,7 @@ heap_getmem( Heap *heap )
830830
return( NULL );
831831
}
832832

833-
EXTRACTNODE( heap, hn );
833+
(void) EXTRACTNODE( heap, hn );
834834

835835
return( hn );
836836
}

src/heap.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,20 +336,20 @@ typedef struct _HeapClass {
336336
* pointer in node to heap sym pointer.
337337
*/
338338
#ifdef DEBUG_HEAP
339-
#define EXTRACTNODE(H,A) \
340-
(heap_sanity(H),(A)=(H)->free,(H)->free=GETLEFT(A),0)
339+
#define EXTRACTNODE( H, A ) \
340+
(heap_sanity( H ), (A) = (H)->free, (H)->free = GETLEFT( A ), 0)
341341
#else /*!DEBUG_HEAP*/
342-
#define EXTRACTNODE(H,A) \
343-
((A)=(H)->free,(H)->free=GETLEFT(A),0)
342+
#define EXTRACTNODE( H, A ) \
343+
((A) = (H)->free, (H)->free = GETLEFT( A ), 0)
344344
#endif /*DEBUG_HEAP*/
345345

346346
/* Allocate a new node from heap H, pop the pointer into A, return non-zero if
347347
* alloc failed. Node is uninitialised!
348348
*/
349-
#define NEWNODE(H,A) ( \
350-
(H)->free ?\
351-
EXTRACTNODE(H,A):\
352-
(((A)=heap_getmem(H)) ? 0 : -1)\
349+
#define NEWNODE( H, A ) ( \
350+
(H)->free ? \
351+
EXTRACTNODE( H, A ): \
352+
(((A) = heap_getmem( H )) ? 0 : -1) \
353353
)
354354

355355
typedef void *(*heap_safe_pointer_fn)( Heap *heap, PElement *,

src/matrixview.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,10 @@ matrixview_text_build( Matrixview *matrixview )
494494
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( matrixview->sheet ),
495495
FALSE );
496496

497+
/* Stops a harmless compiler warning.
498+
*/
499+
column = NULL;
500+
497501
for( i = 0; i < matrix->value.width; i++ ) {
498502
GtkCellRenderer *renderer;
499503
char buf[256];

0 commit comments

Comments
 (0)