Fix missing argments for drive parse filter on lpr #100

Merged
MicheleC merged 1 commits from feat/fix-lpr-driveparse-filter-args into master 4 years ago
obache commented 4 years ago
Collaborator

It was extended for compressed PPD support, but not refrected to lpr parts.

It was extended for compressed PPD support, but not refrected to lpr parts.
SlavekB approved these changes 4 years ago
SlavekB left a comment
Owner

It looks good.

It looks good.
MicheleC approved these changes 4 years ago
MicheleC left a comment
Owner

Looks good but code could be improved.

Looks good but code could be improved.
}
int parseApsFile(const char *filename, FILE *output)
int parseApsFile(const char *filename, const char *orign, const char *metadata, FILE *output)
Owner

I would use something like

int parseApsFile(const char *filename, const char * /* orign */, const char * /* metadata */, FILE *output)

or

int parseApsFile(const char *filename, const char *, const char *, FILE *output)

given those two parameters are not used in the function.

I would use something like ``` int parseApsFile(const char *filename, const char * /* orign */, const char * /* metadata */, FILE *output) ``` or ``` int parseApsFile(const char *filename, const char *, const char *, FILE *output) ``` given those two parameters are not used in the function.
obache commented 4 years ago
Poster
Collaborator

I thought so too but just selected a same manner used in other parser functions including parseCompressedPpdFile in tdeprint/cups/make_driver_db_cups.c, it is the only implementation using such two extra args.

I thought so too but just selected a same manner used in other parser functions including `parseCompressedPpdFile` in tdeprint/cups/make_driver_db_cups.c, it is the only implementation using such two extra args.
}
int parseIfhpFile(const char *filename, FILE *output)
int parseIfhpFile(const char *filename, const char *orign, const char *metadata, FILE *output)
Owner

Similar comment here.

Similar comment here.
Owner

Great, it's good to avoid warnings from the compiler. I assume there are no objections to squash commits into one?

Great, it's good to avoid warnings from the compiler. I assume there are no objections to squash commits into one?
MicheleC merged commit 15116d8f64 into master 4 years ago
MicheleC deleted branch feat/fix-lpr-driveparse-filter-args 4 years ago
Owner

Fixed typo, squashed and merge as discussed.

Fixed typo, squashed and merge as discussed.
MicheleC added this to the R14.0.9 release milestone 4 years ago
Collaborator

I'm getting errors from gcc 9.3.0 due to the fact that it's possible to remove the parameter names under C++, but not under C, so the commenting in tdeprint/driverparse.c and tdeprint/lpr/make_driver_db_lpr.c is causing problems but tdeprint/cups/make_driver_db_cups.cpp compiles fine.

I'm getting errors from gcc 9.3.0 due to the fact that it's possible to remove the parameter names under C++, but not under C, so the commenting in tdeprint/driverparse.c and tdeprint/lpr/make_driver_db_lpr.c is causing problems but tdeprint/cups/make_driver_db_cups.cpp compiles fine.
Owner

@aneejit1 thank you for the warning! Fixed by commit 1b2d3b15.

@aneejit1 thank you for the warning! Fixed by commit 1b2d3b15.

Reviewers

SlavekB approved these changes 4 years ago
MicheleC approved these changes 4 years ago
The pull request has been merged as 15116d8f64.
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdelibs#100
Loading…
There is no content yet.