[Mesa-dev] [PATCH 1/6] gallium: Remove unnecessary semicolons
Brian Paul
brianp at vmware.com
Mon Dec 14 10:11:59 PST 2015
On 12/14/2015 09:27 AM, Edward O'Callaghan wrote:
> Found-by: Coccinelle
> Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
> ---
> src/gallium/auxiliary/draw/draw_pipe_aaline.c | 2 +-
> src/gallium/auxiliary/gallivm/lp_bld_swizzle.c | 2 +-
> src/gallium/auxiliary/nir/tgsi_to_nir.c | 2 +-
> src/gallium/auxiliary/util/u_surface.c | 2 +-
> src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 2 +-
> src/gallium/state_trackers/nine/swapchain9.c | 2 +-
> src/gallium/state_trackers/omx/entrypoint.c | 2 +-
> src/gallium/state_trackers/vdpau/mixer.c | 2 +-
> 8 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
> index 877db59..4a676b7 100644
> --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
> +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
> @@ -937,7 +937,7 @@ draw_aaline_prepare_outputs(struct draw_context *draw,
> const struct pipe_rasterizer_state *rast = draw->rasterizer;
>
> /* update vertex attrib info */
> - aaline->pos_slot = draw_current_shader_position_output(draw);;
> + aaline->pos_slot = draw_current_shader_position_output(draw);
>
> if (!rast->line_smooth)
> return;
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
> index b1aef71..f571838 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
> @@ -720,7 +720,7 @@ lp_build_transpose_aos_n(struct gallivm_state *gallivm,
>
> default:
> assert(0);
> - };
> + }
> }
>
>
> diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> index 5def6d3..5cbe8e9 100644
> --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
> +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
> @@ -1951,7 +1951,7 @@ tgsi_processor_to_shader_stage(unsigned processor)
> case TGSI_PROCESSOR_COMPUTE: return MESA_SHADER_COMPUTE;
> default:
> unreachable("invalid TGSI processor");
> - };
> + }
> }
>
> struct nir_shader *
> diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
> index 6aa44f9..67da59f 100644
> --- a/src/gallium/auxiliary/util/u_surface.c
> +++ b/src/gallium/auxiliary/util/u_surface.c
> @@ -600,7 +600,7 @@ is_box_inside_resource(const struct pipe_resource *res,
> depth = res->array_size;
> assert(res->array_size % 6 == 0);
> break;
> - case PIPE_MAX_TEXTURE_TYPES:;
> + case PIPE_MAX_TEXTURE_TYPES:
> }
>
> return box->x >= 0 &&
That semicolon is needed for MSVC (at least). You'll get a "syntax
error: missing ';' before '}'" error otherwise.
-Brian
> diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> index f5bb3a0..b5c7045 100644
> --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
> @@ -792,7 +792,7 @@ vl_mpeg12_end_frame(struct pipe_video_codec *decoder,
> for (j = 0; j < VL_MAX_REF_FRAMES; ++j) {
> if (!ref_frames[j] || !ref_frames[j][i]) continue;
>
> - vb[2] = vl_vb_get_mv(&buf->vertex_stream, j);;
> + vb[2] = vl_vb_get_mv(&buf->vertex_stream, j);
> dec->context->set_vertex_buffers(dec->context, 0, 3, vb);
>
> vl_mc_render_ref(i ? &dec->mc_c : &dec->mc_y, &buf->mc[i], ref_frames[j][i]);
> diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
> index 3f5be26..3b1a7a4 100644
> --- a/src/gallium/state_trackers/nine/swapchain9.c
> +++ b/src/gallium/state_trackers/nine/swapchain9.c
> @@ -790,7 +790,7 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
> case D3DSWAPEFFECT_FLIP:
> UNTESTED(4);
> case D3DSWAPEFFECT_DISCARD:
> - /* rotate the queue */;
> + /* rotate the queue */
> pipe_resource_reference(&res, This->buffers[0]->base.resource);
> for (i = 1; i <= This->params.BackBufferCount; i++) {
> NineSurface9_SetResourceResize(This->buffers[i - 1],
> diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
> index da9ca10..afcbd97 100644
> --- a/src/gallium/state_trackers/omx/entrypoint.c
> +++ b/src/gallium/state_trackers/omx/entrypoint.c
> @@ -137,7 +137,7 @@ OMX_ERRORTYPE omx_workaround_Destructor(OMX_COMPONENTTYPE *comp)
> priv->state = OMX_StateInvalid;
> tsem_up(priv->messageSem);
>
> - /* wait for thread to exit */;
> + /* wait for thread to exit */
> pthread_join(priv->messageHandlerThread, NULL);
>
> return omx_base_component_Destructor(comp);
> diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
> index c0b1ecc..dec79ff 100644
> --- a/src/gallium/state_trackers/vdpau/mixer.c
> +++ b/src/gallium/state_trackers/vdpau/mixer.c
> @@ -294,7 +294,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
> default:
> pipe_mutex_unlock(vmixer->device->mutex);
> return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE;
> - };
> + }
>
> if (deinterlace != VL_COMPOSITOR_WEAVE && vmixer->deint.enabled &&
> video_surface_past_count > 1 && video_surface_future_count > 0) {
>
More information about the mesa-dev
mailing list