FAT: Fix 32 bit gcc2 compile.
You can't initialize struct fields in the declaration in gcc2, but you can set them up in a constructor. So made one for struct diri, and initialize nested sub-structures too. Change-Id: Ic8b824bc157cca4cdb8c4e41afdca596776c0d55 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4995 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
4ac797a9cf
commit
7c09ef1255
@@ -306,6 +306,16 @@ diri_init(nspace *vol, uint32 cluster, uint32 index, struct diri *diri)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diri::diri()
|
||||||
|
{
|
||||||
|
csi.vol = NULL;
|
||||||
|
csi.cluster = 0;
|
||||||
|
csi.sector = 0;
|
||||||
|
|
||||||
|
current_block = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
diri::~diri()
|
diri::~diri()
|
||||||
{
|
{
|
||||||
if (current_block != NULL)
|
if (current_block != NULL)
|
||||||
|
|||||||
@@ -34,11 +34,12 @@ status_t csi_write_block(struct csi *csi, uint8 *buffer);
|
|||||||
|
|
||||||
/* directory entry iterator */
|
/* directory entry iterator */
|
||||||
struct diri {
|
struct diri {
|
||||||
struct csi csi = {};
|
struct csi csi;
|
||||||
uint32 starting_cluster;
|
uint32 starting_cluster;
|
||||||
uint32 current_index;
|
uint32 current_index;
|
||||||
uint8 *current_block = NULL;
|
uint8 *current_block;
|
||||||
|
|
||||||
|
diri();
|
||||||
~diri();
|
~diri();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user