summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-05-01 10:00:07 +0200
committerTyge Løvset <[email protected]>2023-05-01 10:02:12 +0200
commitf916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe (patch)
tree22283c2d74f2cac441ce04b3106e144f440b8137 /include
parent49e7d9cc0a888b0b19aa4e737d55a2bc33bec824 (diff)
downloadSTC-modified-f916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe.tar.gz
STC-modified-f916573e2b3652d9b3f6fb82aadd5f2cfb3ce2fe.zip
Remove warnings when using -Wextra.
Diffstat (limited to 'include')
-rw-r--r--include/stc/cbits.h4
-rw-r--r--include/stc/csmap.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/cbits.h b/include/stc/cbits.h
index 19e281a8..855d6eb7 100644
--- a/include/stc/cbits.h
+++ b/include/stc/cbits.h
@@ -125,7 +125,7 @@ STC_INLINE bool _cbits_disjoint(const uint64_t* set, const uint64_t* other, cons
#define _i_assert(x) assert(x)
#define i_type cbits
-struct { uint64_t *data64; int64_t _size; } typedef i_type;
+typedef struct { uint64_t *data64; int64_t _size; } i_type;
STC_INLINE cbits cbits_init(void) { return c_LITERAL(cbits){NULL}; }
STC_INLINE void cbits_create(cbits* self) { self->data64 = NULL; self->_size = 0; }
@@ -197,7 +197,7 @@ STC_INLINE cbits cbits_with_pattern(const int64_t size, const uint64_t pattern)
#define i_type c_PASTE(cbits, i_capacity)
#endif
-struct { uint64_t data64[(i_capacity - 1)/64 + 1]; } typedef i_type;
+typedef struct { uint64_t data64[(i_capacity - 1)/64 + 1]; } i_type;
STC_INLINE i_type _i_memb(_init)(void) { return c_LITERAL(i_type){0}; }
STC_INLINE void _i_memb(_create)(i_type* self) {}
diff --git a/include/stc/csmap.h b/include/stc/csmap.h
index 6b8475eb..fbfea8dd 100644
--- a/include/stc/csmap.h
+++ b/include/stc/csmap.h
@@ -283,7 +283,7 @@ _cx_memb(_reserve)(_cx_self* self, const intptr_t cap) {
_cx_node* nodes = (_cx_node*)i_realloc(self->nodes, (cap + 1)*c_sizeof(_cx_node));
if (!nodes)
return false;
- nodes[0] = c_LITERAL(_cx_node){{0, 0}, 0};
+ nodes[0] = c_LITERAL(_cx_node){0};
self->nodes = nodes;
self->cap = (int32_t)cap;
return true;