Skip to content

Commit

Permalink
Fix warns (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
reshke authored Jan 29, 2025
1 parent a806eab commit 7dd878b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions include/pg.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ extern "C" {
#include "access/aosegfiles.h"
#include "storage/bufmgr.h"
#include "storage/lmgr.h"
#include "storage/fd.h"

#if PG_VERSION_NUM < 100000
#include "utils/tqual.h"
Expand Down
2 changes: 1 addition & 1 deletion include/proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ EXTERNC int yezzey_FileSync(SMGRFile file);
EXTERNC SMGRFile yezzey_AORelOpenSegFile(const char *fileName, int fileFlags);
#else
EXTERNC SMGRFile yezzey_AORelOpenSegFile(Oid reloid, char *nspname,
char *relname, const char *fileName,
char *relname, FileName *fName,
int fileFlags, int fileMode,
int64 modcount);
#endif
Expand Down
4 changes: 3 additions & 1 deletion smgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ const f_smgr *smgr_yezzey(BackendId backend, RelFileNode rnode, SMgrImpl which)
}
#endif

const f_smgr_ao *smgrao_yezzey() { return &yezzey_smgr_ao; }
const f_smgr_ao *smgrao_yezzey(void) {
return &yezzey_smgr_ao;
}

void smgr_init_yezzey(void) {
#if IsGreenplum6
Expand Down
4 changes: 3 additions & 1 deletion src/proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,13 @@ EXTERNC SMGRFile yezzey_AORelOpenSegFile(Oid reloid, const char *nspname,
int64 modcount)
#else
EXTERNC SMGRFile yezzey_AORelOpenSegFile(Oid reloid, char *nspname,
char *relname, const char *fileName,
char *relname, FileName *fName,
int fileFlags, int fileMode,
int64 modcount)
#endif
{
auto fileName = (char *) fName;

if (modcount != -1) {
/* advance modcount to the value it will be after commit */
++modcount;
Expand Down
4 changes: 1 addition & 3 deletions yezzey.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,7 @@ Datum yezzey_relation_describe_external_storage_structure_internal(
Oid reloid;
Relation aorel;
int i;
int total_segfiles;
int nvp;
int inat;
Snapshot appendOnlyMetaDataSnapshot;
FuncCallContext *funcctx;
MemoryContext oldcontext;
Expand Down Expand Up @@ -1277,7 +1275,7 @@ static void yezzey_ExecuterStartHook(QueryDesc *queryDesc, int eflags) {
if (queryDesc->plannedstmt->relationOids->length != 1) {
elog(ERROR, "unexpected plan relation size for yezzey alter: %d", queryDesc->plannedstmt->relationOids->length);
}
sourceOid = lfirst(queryDesc->plannedstmt->relationOids->head);
sourceOid = lfirst_oid(queryDesc->plannedstmt->relationOids->head);
/* so, target relation is yezzey. This should be expand or alter table reorg; */
YezzeyCopyOTM(iclause->rel, sourceOid);
}
Expand Down
2 changes: 1 addition & 1 deletion yezzey.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const f_smgr *smgr_yezzey(BackendId backend, RelFileNode rnode, SMgrImpl which);
#endif

#if IsGreenplum6 || IsModernYezzey
const f_smgr_ao *smgrao_yezzey();
const f_smgr_ao *smgrao_yezzey(void);
#endif
void smgr_init_yezzey(void);

Expand Down

0 comments on commit 7dd878b

Please sign in to comment.