Skip to content

Commit

Permalink
chore(core): Deal with C compiler warnings in Lua C modules
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Oct 30, 2023
1 parent 81e1749 commit 2ca7c50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/justenoughharfbuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int shape (lua_State *L) {
const char * lang = luaL_checkstring(L, 5);
double point_size = luaL_checknumber(L, 6);
const char * featurestring = luaL_checkstring(L, 7);
char * shaper_list_string = luaL_checkstring(L, 8);
char * shaper_list_string = (char *)luaL_checkstring(L, 8);
const char * const* shaper_list = NULL;
if (strlen(shaper_list_string) > 0) {
shaper_list = (const char * const*)scan_shaper_list(shaper_list_string);
Expand Down
6 changes: 3 additions & 3 deletions src/justenoughlibtexpdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
pdf_doc *p = NULL;
double height = 0.0;
double precision = 65536.0;
char* producer = "SILE";
const char* producer = "SILE";

#define ASSERT_PDF_OPENED(p) \
if (!p) { \
Expand All @@ -24,10 +24,10 @@ char* producer = "SILE";

int pdf_init (lua_State *L) {
pdf_rect mediabox;
const char* fn = luaL_checkstring(L, 1);
const char* fn = luaL_checkstring(L, 1);
double w = luaL_checknumber(L, 2);
height = luaL_checknumber(L, 3);
producer = luaL_checkstring(L, 4);
const char* producer = luaL_checkstring(L, 4);

p = texpdf_open_document(fn, 0, w, height, 0,0,0);
texpdf_init_device(p, 1/precision, 2, 0);
Expand Down

0 comments on commit 2ca7c50

Please sign in to comment.