Changeset 9185847 in git


Ignore:
Timestamp:
17/01/14 07:23:16 (6 years ago)
Author:
Olly Betts <olly@…>
Branches:
line_contents, master, stereo, travis-osx
Children:
ee3d89c
Parents:
b864b43
Message:

src/: Use cast to void rather than assignment to self to suppress
unused parameter warnings, as clang warns about the latter.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rb864b43 r9185847  
     1Fri Jan 17 07:22:32 GMT 2014  Olly Betts <olly@survex.com>
     2
     3        * src/: Use cast to void rather than assignment to self to suppress
     4          unused parameter warnings, as clang warns about the latter.
     5
    16Fri Jan 17 07:12:47 GMT 2014  Olly Betts <olly@survex.com>
    27
  • src/cad3d.c

    rb864b43 r9185847  
    66 */
    77
    8 /* Copyright (C) 1994-2004,2008,2010,2011,2013 Olly Betts
     8/* Copyright (C) 1994-2004,2008,2010,2011,2013,2014 Olly Betts
    99 * Copyright (C) 2004 John Pybus (SVG Output code)
    1010 *
     
    200200dxf_start_pass(int layer)
    201201{
    202    layer = layer;
     202   (void)layer;
    203203}
    204204
     
    206206dxf_move(const img_point *p)
    207207{
    208    p = p; /* unused */
     208   (void)p; /* unused */
    209209}
    210210
     
    286286skencil_line(const img_point *p1, const img_point *p, bool fSurface)
    287287{
    288    fSurface = fSurface; /* unused */
    289    p1 = p1; /* unused */
     288   (void)fSurface; /* unused */
     289   (void)p1; /* unused */
    290290   fprintf(fh, "bs(%.3f,%.3f,%.3f)\n", p->x * factor, p->y * factor, 0.0);
    291291}
     
    294294skencil_label(const img_point *p, const char *s, bool fSurface)
    295295{
    296    fSurface = fSurface; /* unused */
     296   (void)fSurface; /* unused */
    297297   fprintf(fh, "fp((0,0,0))\n");
    298298   fprintf(fh, "le()\n");
     
    311311skencil_cross(const img_point *p, bool fSurface)
    312312{
    313    fSurface = fSurface; /* unused */
     313   (void)fSurface; /* unused */
    314314   fprintf(fh, "b()\n");
    315315   fprintf(fh, "bs(%.3f,%.3f,%.3f)\n",
     
    452452svg_line(const img_point *p1, const img_point *p, bool fSurface)
    453453{
    454    fSurface = fSurface; /* unused */
    455    p1 = p1; /* unused */
     454   (void)fSurface; /* unused */
     455   (void)p1; /* unused */
    456456   fprintf(fh, "L%.3f %.3f", p->x * factor, p->y * -factor);
    457457   to_close = 1;
     
    461461svg_label(const img_point *p, const char *s, bool fSurface)
    462462{
    463    fSurface = fSurface; /* unused */
     463   (void)fSurface; /* unused */
    464464   fprintf(fh, "<text transform=\"translate(%.3f %.3f)\">",
    465465           p->x * factor, p->y * -factor);
     
    472472svg_cross(const img_point *p, bool fSurface)
    473473{
    474    fSurface = fSurface; /* unused */
     474   (void)fSurface; /* unused */
    475475   fprintf(fh, "<circle id=\"%s\" cx=\"%.3f\" cy=\"%.3f\" r=\"%.3f\"/>\n",
    476476           find_name(p), p->x * factor, p->y * -factor, marker_size * SQRT_2);
     
    513513plt_start_pass(int layer)
    514514{
    515    layer = layer;
     515   (void)layer;
    516516}
    517517
     
    529529plt_line(const img_point *p1, const img_point *p, bool fSurface)
    530530{
    531    fSurface = fSurface; /* unused */
    532    p1 = p1; /* unused */
     531   (void)fSurface; /* unused */
     532   (void)p1; /* unused */
    533533   /* Survex is E, N, Alt - PLT file is N, E, Alt */
    534534   fprintf(fh, "D %.3f %.3f %.3f ",
     
    541541plt_label(const img_point *p, const char *s, bool fSurface)
    542542{
    543    fSurface = fSurface; /* unused */
     543   (void)fSurface; /* unused */
    544544   /* FIXME: also ctrl characters - ought to remap them, not give up */
    545545   if (strchr(s, ' ')) {
     
    553553plt_cross(const img_point *p, bool fSurface)
    554554{
    555    fSurface = fSurface; /* unused */
    556    p = p; /* unused */
     555   (void)fSurface; /* unused */
     556   (void)p; /* unused */
    557557}
    558558
  • src/editwrap.c

    rb864b43 r9185847  
    11/* editwrap.c
    22 * Run svxedit.tcl from the same directory as this program
    3  * Copyright (C) 2002,2010 Olly Betts
     3 * Copyright (C) 2002,2010,2014 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    3232   wchar_t *buf = NULL, *p;
    3333   PWSTR cmd_line;
    34    hInst = hInst; /* suppress compiler warning */
    35    hPrevInst = hPrevInst; /* suppress compiler warning */
    36    lpCmdLine = lpCmdLine; /* suppress compiler warning */
     34   (void)hInst; /* suppress compiler warning */
     35   (void)hPrevInst; /* suppress compiler warning */
     36   (void)lpCmdLine; /* suppress compiler warning */
    3737   while (1) {
    3838       DWORD got;
  • src/export.cc

    rb864b43 r9185847  
    281281DXF::line(const img_point *p1, const img_point *p, bool fSurface, bool fPendingMove)
    282282{
    283    fPendingMove = fPendingMove; /* unused */
     283   (void)fPendingMove; /* unused */
    284284   fprintf(fh, "0\nLINE\n");
    285285   fprintf(fh, fSurface ? "8\nSurface\n" : "8\nCentreLine\n"); /* Layer */
     
    427427Skencil::line(const img_point *p1, const img_point *p, bool fSurface, bool fPendingMove)
    428428{
    429    fSurface = fSurface; /* unused */
     429   (void)fSurface; /* unused */
    430430   if (fPendingMove) {
    431431       fprintf(fh, "b()\n");
     
    438438Skencil::label(const img_point *p, const char *s, bool fSurface, int)
    439439{
    440    fSurface = fSurface; /* unused */
     440   (void)fSurface; /* unused */
    441441   fprintf(fh, "fp((0,0,0))\n");
    442442   fprintf(fh, "le()\n");
     
    455455Skencil::cross(const img_point *p, bool fSurface)
    456456{
    457    fSurface = fSurface; /* unused */
     457   (void)fSurface; /* unused */
    458458   fprintf(fh, "b()\n");
    459459   fprintf(fh, "bs(%.3f,%.3f,%.3f)\n",
     
    628628SVG::line(const img_point *p1, const img_point *p, bool fSurface, bool fPendingMove)
    629629{
    630    fSurface = fSurface; /* unused */
     630   (void)fSurface; /* unused */
    631631   if (fPendingMove) {
    632632       if (to_close) {
     
    642642SVG::label(const img_point *p, const char *s, bool fSurface, int)
    643643{
    644    fSurface = fSurface; /* unused */
     644   (void)fSurface; /* unused */
    645645   fprintf(fh, "<text transform=\"translate(%.3f %.3f)\">",
    646646           p->x * factor, p->y * -factor);
     
    653653SVG::cross(const img_point *p, bool fSurface)
    654654{
    655    fSurface = fSurface; /* unused */
     655   (void)fSurface; /* unused */
    656656   fprintf(fh, "<circle id=\"%s\" cx=\"%.3f\" cy=\"%.3f\" r=\"%.3f\"/>\n",
    657657           find_name(p), p->x * factor, p->y * -factor, marker_size * SQRT_2);
     
    766766PLT::line(const img_point *p1, const img_point *p, bool fSurface, bool fPendingMove)
    767767{
    768    fSurface = fSurface; /* unused */
     768   (void)fSurface; /* unused */
    769769   if (fPendingMove) {
    770770       /* Survex is E, N, Alt - PLT file is N, E, Alt */
     
    811811PLT::label(const img_point *p, const char *s, bool fSurface, int)
    812812{
    813    fSurface = fSurface; /* unused */
     813   (void)fSurface; /* unused */
    814814   set_name(p, s);
    815815}
     
    10751075EPS::line(const img_point *p1, const img_point *p, bool fSurface, bool fPendingMove)
    10761076{
    1077    fSurface = fSurface; /* unused */
     1077   (void)fSurface; /* unused */
    10781078   if (fPendingMove) {
    10791079       fprintf(fh, "%.2f %.2f M\n", p1->x, p1->y);
     
    11051105EPS::cross(const img_point *p, bool fSurface)
    11061106{
    1107    fSurface = fSurface; /* unused */
     1107   (void)fSurface; /* unused */
    11081108   fprintf(fh, "%.2f %.2f X\n", p->x, p->y);
    11091109}
  • src/printwx.cc

    rb864b43 r9185847  
    18931893   char **vals;
    18941894
    1895    fCalibrate = fCalibrate; /* suppress unused argument warning */
     1895   (void)fCalibrate; /* suppress unused argument warning */
    18961896
    18971897   vals = ini_read(fh_list, "aven", vars);
Note: See TracChangeset for help on using the changeset viewer.